I know you've got to play around with the host files to block a site and know how to do that and I am able to block almost all the sites I want blocked.
I follow these instructions and i get sites blocked.

=======================================
Use Finder to search for the application Terminal.
In there type: sudo pico /etc/hosts
Enter your root password.
Use the arrow keys to move down to the bottom line and then type:

for example, if I attempt to block Yahoo.com and gawker.com, yahoo will get blocked and gawker.com wont.

I have noticed that the sites that refuse to get blocked start out with 'http://' and do not have the 'www' on their URL. for example, http://gawker.com is how the URL appears on my address bar.

any help/suggestion will be greatly appreciated.

Click to expand...

What you are doing is a brute force approach to blocking sites. You are editing your "/etc/hosts" file to add blacklisted sites to it.

The syntax for the hosts file is as follows:
ip_address hostname

If you want to block www .gawker.com and gawker.com, you will need 2 entries on the same line:127.0.0.1 gawker.com www .gawker.com
127.0.0.1 yahoo.com www .yahoo.com

Note: I had to insert blanks between www and .whatever.com to prevent vbulletin from turning everything into links.

This isn't foolproof because somebody could always simply enter www2 .yahoo.com and get around your blacklist.

Be very careful when editing /etc/hosts! Do not simply delete /etc/hosts to undo all your changes. You can render your machine incapable of connecting to the local network or the internet! I suggest you look for another approach to blacklisting web sites.

For your reference, here is the default /etc/hosts in case you want to get back to the way it should be...

Code:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost

A better blacklist method might be to use a dns based filtering service like opendns. Read everything carefully and be sure to follow all their directions. Also make a note of your current dns settings before chaning over to theirs in case you break something and need to go back. If you break something, you will need access to the net to get help fixing it so proceed methodically and slowly and write everything down so you can go back to where you were before you started. Opendns allows you to block sites by category, ie violence or adult content. You can also whitelist sites that you don't want blocked and blacklist sites you do want blocked.

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.