iptables -L
iptables -I INPUT -s 25.55.55.55 -j DROP
iptables -D INPUT -s 25.55.55.55 -j DROP

2 IP-Adressen auf einer Netzwerkkarte und Routing

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -A POSTROUTING -t nat -s 172.19.100.0/255.255.255.0 -j MASQUERADE

Facebook blockieren

FACEBOOK_ALLOW="192.168.1.12 192.168.1.14 192.168.1.111"
iptables -N FACEBOOK
 
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 66.220.144.0-66.220.159.255 --dport 443 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 69.63.176.0-69.63.191.255 --dport 443 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 204.15.20.0-204.15.23.255 --dport 443 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 66.220.144.0-66.220.159.255 --dport 80 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 69.63.176.0-69.63.191.255 --dport 80 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 204.15.20.0-204.15.23.255 --dport 80 -j FACEBOOK
 
## FACEBOOK ALLOW
for face in $FACEBOOK_ALLOW; do
    iptables -A FACEBOOK -s $face -j ACCEPT
done
iptables -A FACEBOOK -j REJECT