How do I block ad sites? Let me count the ways...
I received several comments shortly after boasting that I had successfully blocked DoubleClick. There are many ways to block advertisers. I have used cookie blocking, manipulating domain name resolution, and configuring a "blocked site" policy in a firewall.
Blocking Ad cookies is simple and can be done by configuring a browser to block 3rd party cookies, which are often written to your computer by ad tracking companies. Read how to do this in IE 6.0 here. The same feature is available in Firefox via the Cookies tab of the Privacy Option under Tools. Many antispyware software also provide cookie blocking. (An interesting feature of Firefox allows remove a cookie and block a site from ever setting it again).
An advertiser must open connections to its ad server to collect the information it stores in the cookie it has placed on your computer. These connection attempts are programmed into web pages you visit (the site hosting pages with such hidden connections pays the advertiser for its tracking and targeted marketing services, and is called an affiliate). Fortunately, an advertiser must use the DNS to resolve the domain name of its ad server to an IP address. By modifying your PC's hosts file so that ad server names resolve to localhost (127.0.0.1), you redirect connection requests to your own PC. These will fail quickly. The rest of the page you visit will load. You may see an error similar to the one I captured in BlogID #487, but this depends on how the page is programmed. Either way, DoubleClick can't collect information from you. You can point domain names of all the ad servers you wish to block to localhost, including DoubleClick, AdTech, Honesty, Profero, ValueClick, and hundreds of others. Find lists of ad server lists here. If you run Active Directory on your network and want to block ad servers uniformly across all client PCs, create a group policy to replace the user host file at logon. This trick may also thwart hijacking spyware that alters the user host file.
You can also block ad sites by including the domain names or IP addresses of the ad servers in a blocked site list at your firewall. Your firewall may drop attempts to connect to the blocked site, or it may return an "unreachable" error. Both will cause an 404/http error (page not found). Firewalls and proxies that block sites can also be configured with custom 404 errors, so an admin can advise users that ad blocking is in effect.
But admins shouldn't expect users to go out of their way to thank them.
Archived at http://www.securityskeptic.com/arc20060101.htm#BlogID488
by Dave Piscitello