9

I am having difficulties connecting to my FileZilla Server via my FileZilla Client. When trying to connect to the local address while on the same network I am able to connect successfully though (so the server is functional).

FileZilla client is using Passive mode with plain FTP during these tests.

FileZilla Server Log

(000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> Connected on port 2121, sending welcome message...
(000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> 220-FileZilla Server 0.9.60 beta
(000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> 220-written by Tim Kosse ([email protected])
(000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> 220 Please visit https://filezilla-project.org/
(000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> USER admin
(000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> 331 Password required for admin
(000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> PASS ********
(000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> 230 Logged on
(000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> PWD
(000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> 257 "/" is current directory.
(000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> TYPE I
(000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> 200 Type set to I
(000042)3/3/2017 1:46:16 AM - admin (xxx.xxx.xxx.xxx)> PASV
(000042)3/3/2017 1:46:16 AM - admin (xxx.xxx.xxx.xxx)> 227 Entering Passive Mode (172,16,1,9,27,5)
(000042)3/3/2017 1:46:16 AM - admin (xxx.xxx.xxx.xxx)> MLSD
(000042)3/3/2017 1:46:26 AM - admin (xxx.xxx.xxx.xxx)> 425 Can't open data connection for transfer of "/"

FileZilla Client Log

Status: Connection established, waiting for welcome message...
Status: Logged in
Status: Retrieving directory listing...
Status: Directory listing of "/" successful
Status: Disconnected from server
Status: Resolving address of www.example.com
Status: Connecting to yyy.yyy.yyy.yyy:2121...
Status: Connection established, waiting for welcome message...
Status: Logged in
Status: Retrieving directory listing...
Status: Server sent passive reply with unroutable address. Using server address instead.
Command:    MLSD
Response:   425 Can't open data connection for transfer of "/"
Error:  Failed to retrieve directory listing
1
  • 1
    Besides the answer from @Martin I can see that you are running the FTP server on a non-default port (2121 instead of 21). Some firewalls will monitor FTP control traffic and rewrite PORT and PASV responses to translate the internal IP-address and port to the NAT'ed address. But since you are running on a non-default FTP port the firewall will most likely not monitor the traffic. So if possible you can try to move the server to port 21 to see if that helps. Commented Mar 3, 2017 at 11:03

2 Answers 2

9

You have most probably not opened the data connection ports on the firewall of the server (or have not forwarded the ports on NAT, if there's any).

Check what ports the FTP server is using and open/forward them.

FileZilla Server Options


Another problem is, that you have not configured a correct external IP address in the FTP server.

The FileZilla client can workaround that:

Server sent passive reply with unroutable address. Using server address instead.

But it's just a heuristics, that not all FTP client will do. So make sure you fix this too, even if it is not the immediate problem you have.

See the External Server IP Address for passive mode transfers section in the above screenshot.


See my article on network configuration for FTP for some background.

1
  • 2
    Yep. Forgot to forward the passive ports. Having to go threw two firewalls can really give you a headache sometimes.
    – Pie
    Commented Mar 3, 2017 at 19:07
1

The answer below derives from filezilla wiki:

https://wiki.filezilla-project.org/Setting_up_your_Router_to_Fix_the_%22425_code%22

3 steps in summary:

  1. Setup passmode port range.
  2. Create port forwarding rule on your router.
  3. Create a rule on your windows firewall to enable traffic in/out from your ftp server.

Details below:

(000042)3/3/2017 1:46:16 AM - admin (xxx.xxx.xxx.xxx)> 227 Entering Passive Mode (172,16,1,9,27,5)
(000042)3/3/2017 1:46:16 AM - admin (xxx.xxx.xxx.xxx)> MLSD
(000042)3/3/2017 1:46:26 AM - admin (xxx.xxx.xxx.xxx)> 425 Can't open data connection for transfer of "/"

According to the log messge from the 3rd last line
Entering Passive Mode (172,16,1,9,27,5)

The port used in passmode is 27*256+5 = 6917

Step 1, Setup Filezilla server passive mode:

This setting can be seen from [settings] > Passive mode settings enter image description here

In my case is 6000-6100

Step 2, Router port forwarding setup: Since you are routing the public IP to that server, you then need to create a port forwarding entry on your router according to that port range: enter image description here

Step 3, windows firewall: Next, check if your windows firewall has a rule to allow traffic from your filezilla program, if not then create one enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .