Bypass FTP lock

Asked

Viewed 205 times

1

Hello!

I need to import a . zip file from a Brazilian FTP server. It works perfectly on my development machine, both using Ruby native Net/Ftp and using Linux wget, the problem is it doesn’t work on my production environment in 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 at Digital Ocean and the problem persisted.

Given the present error, I can only conclude that the server does not accept IP connections outside Brazil.

Any suggestions on how to get around the problem? I’m thinking of hiring a host here in Brazil or even create an Amazon EC2 instance in the Region of São Paulo (the Ip will be National in this case?) just to host an API that downloads this file and then save on Amazon S3, where I have full access to the files.

Any better suggestions on how to get around the problem?

  • 1

    I don’t know if this is really the problem, but if "for security reasons" your provider blocks international access, sign that you may be buying cat by hare (already happened, but with very precarious lodging).

  • Thanks for the feedback, Bacco. The FTP server is third party and I have no way to change your settings in any way. My point is: how to get a service with Brazilian IP to at least download the file . zip and go up to Amazon S3.

  • now, see if this is it, because it could be something else and I’m massacring an "innocent provider" unjustly :) - by the way, try direct by IP to see if it’s not DNS problem.

  • If the problem is IP, search by Proxy. Use or configure a proxy in Brazil and see if it solves.

1 answer

0


whereas it is a fact cannot simply add the IP of your Server to the Firewall white list of the server where the file is, you will need to configure, on any server located in Brazil, the forward port via ssh.

The scheme will stay that way:

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

In this question https://unix.stackexchange.com/questions/38755/how-to-download-a-file-through-an-ssh-server you can see an example using wget

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

  • I’ve already implemented the solution through an Amazon EC2 instance in SP. Thank you for the Collaboration

Browser other questions tagged

You are not signed in. Login or sign up in order to post.