3
1
I'm trying to connect to an FTP server that is behind a NAT. The local IP of the server is 172.23.11.41 and the public IP is 194.239.61.58, and I'm connecting to the public IP.
When entering passive mode the server returns its local IP address which is useless. Example:
227 Entering passive mode (172,23,11,41,234,113).
The Linux command-line ftp client cannot establish a data channel when this happens.
I need to get the ftp client to ignore the IP address returned by passive mode (PASV) or to use extended passive mode instead (EPSV), which only returns the port number. Example:
229 Entering extended passive mode (|||64607|).
Is there any way to do this?
Edit:
I'm being told that we use ftp.x86_64, installed by calling sudo yum install ftp
.
1This should be solved at the NAT level (via the FTP module of ip_conntrack) – Eugen Rieck – 2017-02-08T12:26:08.063
You might consider using active mode in your FTP client (and your question really should say which one you're using; there are several FTP clients that are part of Linux distributions). – Toby Speight – 2017-02-08T14:25:20.760