dns name based redirection
I run dnscache at home and tonight (Sat Nov 24 04:53:51 EST 2001) decided to shut off AIM ads, maybe replace their ad with whatever image I wanted to serve from my own server. Replacing their ads is step two; for now I've learned they just display a generic AOL logo when your host is unable to reach theirs. If you ever have a need or are interested in redirecting someone's dns, it's fairly simple to set up.
Assumed:
With regards to my initial goal of replacing AIM ads instead of just disabling them, in Apache I'll probably do something like...# 1. cd to starting point cd /var/services/tinydns/ # 2. tell tinydns to send/receive just from its own interface echo 127.0.0.53 > env/IP cp env/IP env/IPSEND # 3. cd to main data directory cd root/ # 4. make this a root server. this line creates A, PTR, SOA, NS, ... echo ".:127.0.0.53:a" >> data # 5. add A record to whatever IP you want, here the normal loopback echo "+ads.web.aol.com:127.0.0.1" >> data # 6. add to cdb make # 7. jump over to dnscache cd /var/services/dnscache/root/servers/ # 8. forward all ads.web.aol.com queries to the server 127.0.0.53 echo 127.0.0.53 > ads.web.aol.com # 9. test it out, restart stuff if it doesn't work host -t any ads.web.aol.com 127.0.0.53 <VirtualHost ads.web.aol.com> RewriteEngine on RewriteRule /image/(.*) /aimtemplate.gif </VirtualHost> <VirtualHost global.msads.net> RewriteEngine on RewriteRule /ads/(.*) /img/dot_clear.gif </VirtualHost> |