# Generated by iptables-save v1.3.7 on Thu Jun 21 03:54:30 2007 *filter :INPUT ACCEPT [3176:406125] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2394:781113] # accept all from localhost -A INPUT -s 127.0.0.1 -j ACCEPT # accept all previously established connections -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT # ssh -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT # ftp / webserver related -A INPUT -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT # Windows / Samba -A INPUT -p tcp -m state --state NEW -m tcp --dport 137:139 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 426 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT # reject everything else -A INPUT -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Thu Jun 21 03:54:30 2007