The HOSTS file is a computer file originally used to store information on where to find a node on a computer network. This file maps hostnames to IP addresses. If you didn’t know, you can use HOSTS file to block specific websites. Let’s say your son is wasting too much time in Friendster or MySpace website, you can easily block out these 2 websites by adding entries in your HOSTS file.

I got an email from someone asking me how effective it is using HOSTS file to block websites. So now I am going to show you how easy it is to block websites using HOSTS file and whether this method is effective or not.

HOSTS file is located in WINDOWS\system32\drivers\etc for Windows XP. You can edit the HOSTS file using notepad. If you prefer not to edit the HOSTS file manually, you can use a free tool called Any Weblock to block any website on your local computer. It works with any web browser and displays a fake error page. No network knowledge required to configure. You only need to know the domain/subdomain names of the websites.

For example, I’ll use Any Weblock to block Blizzard.com, the maker of the popular Starcraft and Warcraft game.

After adding blizzard.com domain name in Any Weblock, I tried visiting blizzard.com using web browser. It displays Internet Explorer cannot display the webpage.
Internet Explorer cannot display the webpage

It works!

Now the interesting part. How effective is this method used to block websites? Is there anyway to bypass this block? The error message generated by Internet Explorer is very general. There is no way that you’d know for sure that the website is being blocked using HOSTS file.

The first thing I’ll do when a website is inaccessible is I’ll use an online free services provided by DNS Tools to check if the website is up and running. Just do a port 80 and ping check is enough to determine whether the website is up.

I can see that port 80 is not being blocked and there is ping reply, meaning there is no problem with blizzard.com.

Now I can only suspect it’s either the problem with my ISP or my computer. I can call up my friend and ask if he has problems in browsing blizzard.com website. If he don’t have problems with blizzard.com website, then it’s definitely my computer or router. Most routers has the capability of blocking websites as well.

Do a “tracert” on blizzard.com will show me whether my HOSTS file is being compromised.

If it shows localhost 127.0.0.1 or any bogus IP address, it’s BUSTED! I’d check my HOSTS file immediately. If my HOSTS file is clean, it’s definitely my router.

For geeks like me, perhaps we know how to troubleshoot and find the fault. But for a person who doesn’t know much, he/she can also bypass the block easily by using proxy. I can use Anonymoused to open Blizzard.com webpage even though my HOSTS file is redirecting blizzard.com to 127.0.0.1.
Proxy to bypass website ban
Here are a few free proxy anonymous proxy servers. I am sure there are plenty around.
- http://www.privax.us/ (29 proxy sites)
- http://www.goproxing.com/
- http://anonymouse.org
- http://www.google.com/translate?langpair=en|en&u=www.raymond.cc

In short, blocking websites using HOSTS file works. It’s easy and you don’t need to install any software if you know how to manually edit the HOTS file. For computer geeks, bypassing this block is way too easy.

Technorati Tags: , , , ,