Archive for January, 2014

FTP MLSD problem [Solved]

09 Jan

Well, i always have issues whenever i install a new ftp server and end up spending hours to resolve it

It is wise to document this issue once and for all.

here is the solution

You'll need an additional rule to allow "related" connections. This is due to the FTP protocol using one port for commands and another for data.

iptables -A INPUT -p tcp --dport 21 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

Also, there’s a kernel module you’ll need to load for tracking the related connections. It’s called ip_conntrack_ftp but how you load it depends on your distro.

On redhat-ish systems, edit this /etc/sysconfig/iptables-config