> For example, the following rule: > > iptables -A INPUT -m state --state NEW -i ! $EXTIF -j ACCEPT What is the value of EXTIF? > Ends up appearing in the iptables -L list as: > > target prot opt source destination > ACCEPT all -- anywhere anywhere state NEW I think you did not "-d" option. It may mean anywhere. iptables -A INPUT -d $ALLOWIP -m state --state NEW -i ! $EXTIF -j ACCEPT ok?