The BIND name server (version 9.7.2-P2) has an experimental feature allowing administrators to dynamically add and remove zones at run-time, without having to edit named.conf and reload/reconfigure the name server. Beware though: the documentation explicitly states that this feature is currently experimental. In order for this to work, the server's options or view must contain the directive

allow-new-zones yes;

You use the rndc command to add or delete a zone to a view. For example, to add a master zone called example.aa from the file master/example.aa (relative to the name server's directory) to a view called myview, I issue the following command.

rndc addzone example.aa in myview '{type master; file "master/example.aa";};'

The zone is added to the running name server, and it is added to a configuration file. The filename is a hash of the view name with extension .nzf. (Which might stand for new zone file?) The file's content is

zone example.aa {type master; file "master/example.aa";};

Upon restarting named, the server automatically attempts to load this file. It appears that named hashes view names and stabs to see if it finds a hash.nzf and loads that if it finds it. Dynamically added zones can also be deleted with the delzone command:

rndc delzone example.aa
Flattr this
DNS, CLI, BIND, and rndc :: 04 Oct 2010 :: e-mail

Comments

blog comments powered by Disqus