Bypass FTP blocking

1

Hello

I need to import a .zip file from a Brazilian FTP server. It works perfectly on my development machine, both using Ruby's native Net / Ftp and using linux wget, the problem is that it does not work in my production environment on Heroku, it gives time out on the connection: "Connecting to ftp.xxxxxx .com.br (ftp.xxxxxx.com.br) | xxxx.xx.xxx.xxx |: 21 ... ". I have also tested using wget on a virtual machine on Digital Ocean and the problem persisted.

In the face of this error, I can only conclude that the server does not accept IP connections outside of Brazil.

Any suggestions for getting around the problem? I'm thinking of hiring a host here in Brazil or even creating an Amazon EC2 instance in the São Paulo Region (the Ip will be National in this case?) Just to host an API that will download this file and then save it to Amazon S3 , where I have full access to the files.

Any better suggestions on how to get around the problem?

    
asked by anonymous 06.12.2014 / 20:40

1 answer

0

Since it is a fact that you can not simply add the IP of your Server to the whitelist of the Firewall of the server where the file is located, you will need to configure the port on a server located in Brazil forward via ssh.

The layout looks like this:

Meu Servidor => Meu servidor de outra coisa que empresta uma conexão ssh => destino

In this question you can link see an example using wget

Ips of EC2 instances in SP often receive addresses from outside.

    
09.06.2015 / 13:49