Adding a single RR to a foreign zone

Herb Martin news at LearnQuick.com
Thu Jul 31 17:55:49 UTC 2003


> > I have a read-only "cache file" of 75,000 blackhole advertisement
> > and xxx-smut sites that will all resolve to 127.x.y.z
> >
>
> Sounds interesting - can you explain this setup ?

I enabled persistent caching so that the cache would
load when BIND 9 starts.

Then I stopped BIND to get a "sample" persistent
cache written.  Edited that file (to make sense for
what I would want to be persistent from the original)
and left the $DATE directory.

This gave me the format for the persistent cache.

In options or view add:
    cache-file "cache-file.dns";
Naming the cache file makes it persistent.

Then I took the hosts file and ran it through a trivial
Perl program to re-order the records in the correct
order/format and append them to the end of the
(edited) persistent cache.  Also bumped the "TTL"
way up on these records 2,000,000,000 (a long time.)


Used the ATTRIB command (it's a Win2000 machine
so you might use the UNIX equivalent or real permissions
on either OS) to deny read (read-only) on the file.

Run BIND9, it sucks in the cache (about 3 seconds) and
just works.

When it shuts down it can't actually write the (updated)
cache due to the file protection.



More information about the bind-users mailing list