How-to block access to Facebook and Myspace


I would like to know if there a way to block access to Facebook and Myspace as well as instant messaging. I tried to block before and it only blocked it that one way leaving countless other ways to access it. Same with Facebook. Others like and are much of a pest as well.


I suspect the problem is that you can't block encrypted (https) connections by domain name. The connection is encrypted so you can't tell whether you're connecting to a given site.


S. Try doing an nslookup to determine the ip(s) of the sites you want to block. For example, if I run:

I get:
Non-authoritative answer:
You could just block those ips, but big sites like facebook control a large block of ip addresses, and this could change. Here's a trick you can use to address that. Do a whois on one of the above ip addresses, and it will often tell you what the exact range is.

OrgName:    Facebook, Inc.
OrgID:      THEFA-3
Address:    156 University Ave, 3rd floor
City:       Palo Alto
StateProv:  CA
PostalCode: 94301
Country:    US

NetRange: -
OriginAS:   AS32934
I just included the top portion of the whois result since that's the important part. It tells you that Facebook owns the subnet. Block that, and you block facebook. Problem solved!

You can use the same tactic to lookup as well. Actually, I'll save you some time: there are two subnets you should block for myspace, and

tip.txt · Last modified: 2013/05/21 16:04 by eric
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki