Blocking facebook in iptables

I m using simpel iptables comand to redirect or dropping the request connection to facebook. We have to do it inside client’s computer. Cause I still don’t know how to block it in server side.

# iptables -N NOFB
# iptables -A NOFB -d www.facebook.com -p tcp -m tcp –dport 443 -j DROP
# iptables -A NOFB -d facebook.com -p tcp -m tcp –dport 443 -j DROP
# iptables -A NOFB -j RETURN

## lalu pasang sub-chain ini ke chain OUTPUT dan FORWARD
# iptables -I FORWARD -j NOFB
# iptables -I OUTPUT -j NOFB

To apply such a rule in server side, it could be just blocking all traffic to 443 by redirect it to 3128 (proxy squid) but it will result certificate error when trying to connect to https or secure line. Secure line that we might find such as email login, website login etc. So this kind a way is no use.

source : http://forum.linux.or.id/viewtopic.php?f=16&t=20370

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.