Directory listing timeout with ProFTPd in Centos and Virtualmin

I’m using Virtualmin to manage a Centos 5.7 machine.
When trying to use FileZilla to access the server using ftp I kept getting the following errors:

Status: Resolving address of
Status: Connecting to IP_ADDRESS:21…
Status: Connection established, waiting for welcome message…
Response: 220 FTP Server ready.
Command: USER my_username
Response: 331 Password required for
Command: PASS *******
Response: 230 User my_username logged in
Command: OPTS UTF8 ON
Response: 200 UTF8 set to on
Status: Connected
Status: Retrieving directory listing…
Command: PWD
Response: 257 “/” is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (XXX,XXX,XXX,XXX,XXX,XXX).
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing


However using Nautilus, Ubuntu’s file explorer, I had no problem accessing the server.

It turned out to be some modules missing in the server, needed to assure the right support for passive ftp connection.

I just add to edit /etc/sysconfig/iptables-config to make sure it was loading ip_conntrack_ftp and ip_conntrack_tftp:
IPTABLES_MODULES=”ip_conntrack_netbios_ns ip_conntrack_ftp ip_conntrack_tftp”
I then restarted iptables with:

/etc/init.d/iptables restart
And now I can access my files using any FTP client (at least it works with FileZilla ๐Ÿ™‚ )