TenPin Guru


Joined: 26 Aug 2002 Posts: 500 Location: Kansas City
|
Posted: Fri Oct 18, 2002 2:01 pm Post subject: Simple iptables firewall ? |
|
|
I use these rules for iptables. I was wondering if anyone can improve on this without getting hideously complex. This machine has 2 interfaces, 1 for the cable modem and the other for LAN.
-t nat -A POSTROUTING -o eth0 -j MASQUERADE
-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
-A INPUT -i eth0 -p tcp --dport 113 -j REJECT --reject-with tcp-reset
-A INPUT -i eth0 -j DROP
Thanks |
|