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

and

iptables -I FORWARD -m string –algo bm –string “facebook.com” -j DROP

exception example:

iptables -I FORWARD ! -s 192.168.0.0/24 -m string –algo bm –string “facebook.com” -j DROP

By 9M2PJU

An amateur radio operator, military veteran, jack of all trades and master of none.

0 thoughts on “How To Block HTTPS/HTTP For Facebook.com”
  1. And why exactly would you want to do that? Without some context, this seems like the worst use of a firewall ever.

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!