Popular Posts

Wednesday, April 24, 2013

How To Block HTTPS/HTTP For Facebook.com

Add these rules to your iptables

1. iptables -N NOFBHTTPS 
2. iptables -A NOFBHTTPS -d www.facebook.com -p tcp -m tcp --dport 443 -j DROP 
3. iptables -A NOFBHTTPS -d facebook.com -p tcp -m tcp --dport 443 -j DROP 
4. iptables -A NOFBHTTPS -j RETURN iptables -I FORWARD -j NOFBHTTPS 
5. iptables -I OUTPUT -j NOFBHTTPS


iptables -I FORWARD -m string --algo bm --string "facebook.com" -j DROP

exception example:

iptables -I FORWARD ! -s -m string --algo bm --string "facebook.com" -j DROP

1 comment:

m-beyer5 said...

And why exactly would you want to do that? Without some context, this seems like the worst use of a firewall ever.

Related Posts Plugin for WordPress, Blogger...