March 17, 2008

IPTABLES FTP Rules

Learn how to configure IPTABLES on RedHat Linux to allow FTP access with the right modules and firewall rules for seamless connectivity.

To allow FTP with IPTABLES on a RedHat Linux box add “ip_conntrack_ftp” to the IPTABLES_MODULES configuration within /etc/sysconfig/iptables-config and make sure the following two lines are in /etc/sysconfig/iptables:

-A RH-Firewall-1-INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 20:21 -j ACCEPT