Page 1 of 1

Specifying external IP for passive mode makes the ftp server work wrong.

Posted: 2019-04-06 16:03
by andyb
I have rent a VPS Server and installed Windows 2019 Server and FileZilla FTP Server 0.9.60 on it.
The puplic IP address is for ex. 95.95.95.95 and the internal IP is for ex. 10.10.10.10.
In the VPS config the external IP 95.95.95.95 is routed to the internal IP 10.10.10.10.

I configured passive ports 50000-50100 in FileZilla and opened this ports in Windows Firewall and the VPS Firewall config.
And i entered the external IP 95.95.95.95 in "Passive mode settings" / "Use the following IP".

When i connect to the server i get for ex.
227 Entering Passive Mode (95,95,95,95,195,86)
disconnected
on the server. The FTP client displays: Disconnected from server: ECONNABORTED - Connection aborted

When i change the setting to Default (specify no externeal IP) then it seems to work. I get for ex. this on the server:
227 Entering Passive Mode (10,10,10,10,195,86)
STOR Test.txt
150 Opening data channel for file upload to server of "/Test.txt"
226 Successfully transferred "/Test.txt"
The client displays:
227 Entering Passive Mode (95,95,95,95,195,86)

It seems to work without external IP specified for some reason idk, but i wonder whether the FTP Server really sends the correct info
"95,95,95,95,195,86" to the client or whether the client just changes "10,10,10,10,195,86" to "95,95,95,95,195,86".

I want to specify the external IP in the FTP Server settings as suggested when behind NAT but this does not work for me.
The server then seems to try to listen on external IP 95.95.95.95 which fails.
It makes no difference whether "Don't use external IP for local connections" is checked or not.
The server should listen on the internal IP 10.10.10.10 anyway and just tell the client to connect to external IP 95.95.95.95.
Maybe i don't understand something or missed something to configure. Any advice?

Re: Specifying external IP for passive mode makes the ftp server work wrong.

Posted: 2019-04-06 18:53
by boco
Please read the chapter about malicious firewalls and routers in our Network Configuration guide.

Re: Specifying external IP for passive mode makes the ftp server work wrong.

Posted: 2019-04-06 21:03
by andyb
Thank you for the hint!
I activated TLS and now the FTP client log says this:

Response: 227 Entering Passive Mode (10,10,10,10,195,86)
Status: Server sent passive reply with unroutable address. Using server address instead.

A test file upload worked.
With TLS enabled the NAT no longer can "fix" the address.
With TLS enabled it also works now when i enter the external IP.
So, i think now FileZilla works fine. The NAT messes up things in non TLS mode.

Re: Specifying external IP for passive mode makes the ftp server work wrong.

Posted: 2024-04-11 12:42
by DBNewbie_2007
While this is an older thread, THANKS! It helped us with a similar problem (migrating from 0.9.6 to 1.8.1). In our case un-selecting the Use the default host for local connections resolved our issue.