# Location in which iptables initscript will save set rules on
# service shutdown
IPTABLES_SAVE="/var/lib/iptables/rules-save"
# Options to pass to iptables-save and iptables-restore
SAVE_RESTORE_OPTIONS="-c"
# Save state on stopping iptables
SAVE_ON_STOP="yes"
INET_IFACE="eth0"
IPTABLES="/sbin/iptables"
# Block all
for table in INPUT OUTPUT FORWARD ; do
$IPTABLES -P $table DROP
done
$IPTABLES -A INPUT -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A INPUT -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A OUTPUT -p ALL -j ACCEPT
# Allow 6667 IRC port
$IPTABLES -A INPUT -p TCP --dport :6667 -j ACCEPT
# Allow all loopback
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A OUTPUT -o lo -j ACCEPT