Blocking Ads and Malware with MVPS HOSTS

You can use the HOSTS file to block ads and banners, but you can also block many of the parasites and  malware that get onto our machines by surfing websites.  Here is a link to a MONSTER HOSTS:

http://www.mvps.org/winhelp2002/hosts.zip

Banner ads are not all evil and many respectable sites make a living with them. But even a respectable site can unknowingly display an ad that will get you get hijacked by a script or download that can render your machine unusable or worst begin gleaning your passwords by logging your key strokes.  After your download the above HOST file you will need to put that in a specific folder:

Where’s my hosts file?

What Does it Do?

The HOST file redirects the browser to look for banner content at 127.0.0.1 instead of the actual banner host on the interwebs. 127.0.0.1 is a special IP address which, to a computer, always means that computer. Any time a machine sends a network request to 127.0.0.1, it is talking to itself. This is very useful when it comes to blocking ads, because all we have to do is specify the IP address of any ad server to be 127.0.0.1. And to do that, all we have to do is edit the hosts file. What will happen then is something like this:

  1. you visit a web page
  2. the web page contains a banner ad stored on the server “ads.example.com”
  3. your computer says “ads.example.com? never heard of it. wait a second, let’s see if I’ve got the number on me…”
  4. your computer finds its hosts file and checks to see if ads.example.com is listed
  5. it finds the hostname, which points to 127.0.0.1
  6. “great”, says the computer, and sends off a request to 127.0.0.1 for the banner ad that’s supposed to be on the page
  7. “oh”, says the computer, and fails to show anything because it just sent a request to itself for a banner ad

 

Once that is done then close your browsers and reopen and viola you should no longer see any banners.

 

Bookmark the permalink.

Leave a Reply

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