Hosts
Hosts
Immunise Windows for FREE
This is a little tricky but FREE. By adding lines to a file in Windows, you can prevent your browser from visiting bad sites and stop ads.
The hosts file is a cheat sheet for Windows to use when looking up Internet addresses before it goes out to your ISP and asks for a DNS look up. (See the article What’s DNS)
By putting dummy entries in the hosts file you can blind your machine to certain sites. This technique is used by malware to re-direct you to bad sites. I love the idea of turning their own bad idea into a good one. Every time your machine tries to go to doubleclick.com (for example, a bad ad site) it will get an error and give up.
This prevents some malware getting you and stops advertising pop-ups.
How do you do it?
You need to modify the file called hosts. It lives in
c:\windows\system32\drivers\etc
and is called just “hosts” Often there is a sample one in that folder called “hosts.sam” so if you don’t have “hosts” you can rename “hosts.sam” to “hosts”
Next add lines for the bad sites that look like this;
127.0.0.1 doubleclick.com
127.0.0.1 adbot.net
Each line tells Windows that when it is looking for this site, it is to go to IP address 127.0.0.1 which is your own PC. In other words, go nowhere at all.
The easiest way to fix up your hosts file is to download a good one from someone who has done all the hard work for you. Then just save it in the right folder.
There is no need to reboot, as soon as the hosts file has changed, it is in effect immediately.
Many of the ready to use hosts files you can get include entries for Google Adwords and AdSense. I removed these lines as I don’t mind a bit of Google advertising. So if you decide you do want to go to a site blocked by your hosts file, just remove the line that mentions that site.
If you get stuck or want to unblock everything again, just delete the hosts file, Windows does not need it. So removing it will return your machine to normal.
There’s Steve Gibson’s brilliant article on this and links to sample hosts files here.
Thursday, 4 October 2007