# Generated by iptables-save v1.3.8 on Sun May 4 17:48:03 2008 *filter :INPUT ACCEPT [5:952] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [1192099:595387635] # 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 #web -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT # ftp -A INPUT -p tcp -m state --state NEW -m tcp --dport 20:21 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 30000 -j ACCEPT # Windows / Samba -A INPUT -p tcp -m state --state NEW -m tcp --dport 137:139 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --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 #swat -A INPUT -p tcp -m state --state NEW -m tcp --dport 902 -j ACCEPT #aMule -A INPUT -p tcp -m state --state NEW -m tcp --dport 4662 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 4672 -j ACCEPT #XDMCP -A INPUT -p udp -m state --state NEW -m udp --dport 177 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 6000 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 41272 -j ACCEPT #NFS server -A INPUT -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 111 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 2049 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 4001 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 4001 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 4002 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 4002 -j ACCEPT #VNC server -A INPUT -p tcp -m state --state NEW -m tcp --dport 5900:5901 -j ACCEPT #CUPS server -A INPUT -p tcp -m state --state NEW -m tcp --dport 631 -j ACCEPT #distcc -A INPUT -p tcp -m state --state NEW -m tcp --dport 3632 -j ACCEPT #rsync -A INPUT -p tcp -m state --state NEW -m tcp --dport 873 -j ACCEPT #git -A INPUT -p tcp -m state --state NEW -m tcp --dport 9418 -j ACCEPT #ping -A INPUT -p icmp -j ACCEPT #IPSec -A INPUT -p udp --dport 500 -m state --state NEW -j ACCEPT -A OUTPUT -p udp --dport 500 -m state --state NEW -j ACCEPT -A INPUT -p esp -j ACCEPT -A OUTPUT -p esp -j ACCEPT -A INPUT -p ah -j ACCEPT -A OUTPUT -p ah -j ACCEPT #reject everything else -A INPUT -j REJECT --reject-with icmp-port-unreachable COMMIT