1

I've seen a few examples online... but what rules do you guys use in live environments to control your FTP usage? Basic usage, nothing special, but I hear I need to be able to support active ftp sessions.

1 Answer 1

2

Here's a basic setup:

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

Also need to tell iptables to load the kernel module that tracks FTP connections in /etc/sysconfig/iptables-config:

IPTABLES_MODULES="ip_conntrack_ftp"
3
  • where would I add the IPTABLES_MODULES part ? To my rules file?
    – Ben
    Oct 14, 2010 at 20:47
  • No, it goes in /etc/sysconfig/iptables-config file Oct 15, 2010 at 14:10
  • I don't have an iptables-config file anywhere. I'm running ubuntu
    – Ben
    Oct 18, 2010 at 2:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .