One of our readers, Mike Kinney (firstname.lastname@example.org), suggested an alternative. Rather than redirect traffic to a non-existent web server, instead point the advertising domains to a local web server. Obviously, when the request goes to the local web server, it's going to generate a "404 Not Found" error because the expected banner image won't exist on the local server. However, it's very easy to configure your local Apache server to return a custom error document for various error codes. In our case we simply configure the Apache server to return an innocuous GIF image instead of the normal "404 Not Found" error page:
ErrorDocument 404 /dummy.gif
This GIF file could simply be blank, or perhaps it should display a message like "This banner ad intentionally replaced".
Once you've go your local web server all set up, replace the two "127.0.0.1" entries in the original dummy-block file with the IP address of your local web server. Don't forget to also update the serial number in the SOA record in the dummy-block file so that your changes will be picked up. After updating the dummy-block file, restart your name server.
Now start surfing. If everything is configured properly, instead of the normal banner ads you should be seeing your dummy GIF.
In particular, however, Bill's scripts produce this version of the domain list. As you can see, this file is designed to be incorporated directly into your named.conf. You can either append the contents of this file directly to your named.conf, or simply include the file with a directive like:
Obviously, it's up to you to download the file from Bill's web site and install it in the appropriate directory.
Return to: Deer Run Home > Hal's Homepage >