1

Blocking all sites/IP address but Google.se with iptables

view story
linux-howto

http://superuser.com – Im trying to block all IPs but Google.se. It doesnt work (Site does not display) Here is what I wrote: #/bin/sh echo "Flushing IPTables..." sleep 1 iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT echo "Done!" echo "Setting Firewall..." sleep 1 iptables -A INPUT -p tcp -m iprange --src-range 0.0.0.0-255.255.255.255 -j DROP iptables -A OUTPUT -p tcp -m iprange --src-range 0.0.0.0-255.255.255.255 -j DROP iptables -A FORWARD -i wlan0 -d www.google.se -p tcp -- (HowTos)