Well you could do this with a name server to do this (BTW if you're claiming to give answers for certain zones, it's not considered "caching-only") but in order to make it effective you would need to force all your users to only query that server, by using firewall rules. If you don't restrict queries, they can just point to an outside DNS server and everything voided.
Your site policy would seem to be very misguided since the above is essentially what Squid would do (by restricting http traffic to only go through Squid). I suppose the difference is that by default Squid will store information about the http requests while BIND will not (unless you use the logging option to log queries).
Any way...
If you install any of the pre-built BIND packages for Linux, you should get a chaching server right out of the box (you'll need a /etc/named.conf and a root.hints file, which is some times renamed to various things). From there, you can just add various ZONE statements to your named.conf so you claim to be authoritative for a particular zone, then setup a db.yahoo.com file, etc and put the bogus entries in there which resolve to 127.0.0.1, or whatever floats your boat.
Note that if you claim to be authoritative for a particular zone, you will "break" that zone entirely.
|