Archive

Blocking Adverts

Blocking Adverts

Suggestions on Blocking Adverts and Malware While Browsing

The following tips may prove useful in preventing adverts, and other forms of malware from degrading your browsing experience. These tips while useful to everyone, are I feel especially useful to users on slow connections, or when the person surfing needs more protection.

Blocking via hosts/DNS Filtering

One simple idea is to configure a computer’s DNS name to IP resolution so that many well know advertising and “undesirable” servers return an IP address that goes no where, e.g. 127.0.0.1. An easy way to do this is to download a anti-advert hosts table of the Internet and append it to your hosts file. You can also configure your DNS to do the same if you want to block sites on a network. A quick google search will bring up many such hosts files to use, and it’s a great way of protecting children or parents. Periodically you need to simply update your hosts table, and other than that there isn’t much to do.

This approach works for all browsers, and pretty much all operating systems. It’s also less obvious than the various “safe” surf tools that most children can get round. Additionally, it’s cheaper than fancy commercial software, and doesn’t require a custom proxy server.

Use a Good Browser

If you use a browser other than Microsoft’s IE, then you get good out of the box advert control features, along with all the other benefits. While most Linux user’s don’t use IE, their friends and family often still run Windows, and it’s worth trying to wean them onto a better browser. The http://browsehappy.com/ site has some useful suggestions and some nice stories from non-technical people who have made the swicth.

Browsers such as those based on Mozilla.org Gecko and Opera, have nice out of the box control features. Neither support Micrsoft’s ActiveX technology, the source of the majority of malware, and both block pop-ups by default. Both also support the W3C standards better than IE, and offer a number of other security, privacy and convenience features that IE does not.

Wildcard Filtering

Out of the box Opera supports wildcard filtering, and Mozilla & Firefox support filtering via the very popular AdBlock extension. These filtering tools can easily configured to cut out most of all adverts, pop-ups, pop-unders, and other distractions. Whilst the technology is slightly different, they can both use the same filters, many of which can easily be found on the net with Google!

If you are happy with Regular Expressions then the AdBlock extension even supports regular expressions, which allows you to filter with fewer filters, in theory making maintenance easier and the filtering process faster.

To enable Filtering in Opera add the following line to your opera6.ini file in the [[Adv|UserĀ Prefs]] section while Opera is not running:

URL Filter File=/path/to/filter.ini

Here is a sample of my filter.ini file:

; filter.ini ; This file is part of the Opera browser.  [prefs] prioritize excludelist=1  [include]  *   [exclude] http://ad.* http://ads.* http://adserv* http://banner* http://count* http://*.doubleclick.net/* http://*.hitbox.net/* http://*.ivwbox.de/* http://*.adtech.de/* http://*.atdmt.com/* http://*.tradedoubler.* http://*/ads/*

For Mozilla based browsers, install the AdBlock extenstion from http://adblock.mozdev.org/ and add filters in a similar manner! You can also download a text file containing extremely agressive filters for adblock from http://www.geocities.com/pierceive/adblock/ (latest at the bottom). Go to Adblock Preferences->Adblock Options->Import Filters to add a text file to your list.

Useful Links

Leave a Reply