Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been obtaining errors like below because I did not specify enough ports for the active FTP connections.

 Response: 150 Opening data channel for directory list.
 Response: 425 Can't open data connection.Error: Failed to retrieve directory listing

Things seem to work nicely with limited ports, but when I perform actions that cause very rapid short-lived connections, something like 20-30% of the connections drop with the error above.

I started with ports 50000-50100.

When I opened up to 50000-52000, the errors disappeared.

Why did this fix my problem? I would like to understand why adding ports fixed it.

I have a suspicion that ports become "locked down" for a few moments surrounding when they are used in a connection. If connections are happening so rapidly, there may be no ports available, thus the above error.

Can anybody confirm?

share|improve this question
It could have to do with your connections not having enough time to die. By allowing more ports to be used, it is likely that the connections that would not open due to lack of an available open port will then successfully open. If this is the issue, then you can solve the problem by tweaking connection tracking timers. – gparent Apr 2 '12 at 3:17

When you use this mode you should have ports opened in both directions (from server and from client ) the port 21 is only used for the initial handshake between server and client . For transferring files / information you need to open several ports (that's why you can't list with dir ) . On active mode it tries to use 20 , then 21 as it can be seen here ( . I had the same issues but with passive FTP , and because the ports are randomized (depending on your configuration ) , I would recommand you to open the firewall(temporally for all ports ) , then type netstat -ap this will show you what ports it is used by your filezilla server .

After that close the firewall , and open the necessary ports .

share|improve this answer
I've got 21 and 50,000-60,000 open on both sides – Brian Webster Apr 2 '12 at 16:08
Hello Brian as you have seen you need 20 opened also :) , if 20 is blocked it tries to open 22 . – Alex H Apr 2 '12 at 16:41
Windows Firewall problem for me, I add a rule for the Filezilla FTP server executable to allow all connections on local and remote ports – Dai Bok Nov 7 '13 at 14:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.