####
# This Chain logs to syslog and drops the packet
/sbin/iptables -N logdrop
/sbin/iptables -A logdrop -j LOG --log-level notice --log-prefix "REFUSED:"
/sbin/iptables -A logdrop -j DROP

####
# This is the main chain
/sbin/iptables -N main

####
# If a connection is already established we let the packet through
/sbin/iptables -A main -m state --state RELATED,ESTABLISHED -j ACCEPT 

####
# Accept packets from localhost and the local network
/sbin/iptables -A main -s 127.0.0.1 -j ACCEPT 

