Posted: Mon Feb 08, 2010 9:10 pm Post subject: Solved: Timeout on FTP Directory Listing (Linux)
It seems that I am not the only one here that had problems using GCs FTP Service on Linux.
This is the solution for you if you have this problem:
Your Login on the FTP-Service on port 2121 is accepted, Username and Password are working
On the step 'Directory listing' your FTP client runs into a timeout, you can't recieve a list of the directory's content.
Why does this appear?
The FTP Server of the GC Client only accepts passive FTP connections.
This requires to open any port above 1024 for the data connection. This port is choosen randomly.
On login your FTP-Client uses only the control connection on port 2121, no problem. But the directory listing is the first operation that requires a port for data.
Typical linux firewalls are looking for new connections on the typical FTP port 21. If there is a control connection established, the FTP server is allowed to open a data connection on a random port.
That's why normal FTP server will work on your server but GCs Server will not.
The Solution:
Kernel mod nf_conntrack_ftp
This kernel mod is a kind of plugin for the network layer and firewall of your server.
You can tell him which ports are used for FTP-Services.
After doing that this mod will look for connections on this ports to ensure that new passive connections for the FTP-Services can be opened.
To load the Mod in Debian use this command as root:
modprobe nf_conntrack_ftp ports=21,2121
(command may differ in other distributions)
21,2121 is the list of ports where your server has FTP-Services running on.
After rebooting the server you have to reload the mod.
To avoid this, open the file /etc/modules and add the following line:
nf_conntrack_ftp ports=21,2121
Now the module should be loaded each time you start your server.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum