#create new TABLE and FLUSH iptables -N OPENDNSONLY iptables -F OPENDNSONLY #ALLOW OPENDNS IPZ for UDP and TCP on port 54 iptables -A OPENDNSONLY -p UDP --dport 53 -d 208.67.222.222 -j ACCEPT iptables -A OPENDNSONLY -p UDP --dport 53 -d 208.67.222.222 -j ACCEPT iptables -A OPENDNSONLY -p TCP --dport 53 -d 208.67.220.220 -j ACCEPT iptables -A OPENDNSONLY -p TCP --dport 53 -d 208.67.220.220 -j ACCEPT #DROP anythign else iptables -A OPENDNSONLY -p TCP --dport 53 -j DROP iptables -A OPENDNSONLY -p UDP --dport 53 -j DROP #erase rule if already exists and re-add at begining iptables -D FORWARD -j OPENDNSONLY iptables -I FORWARD -j OPENDNSONLY