Automatically sync all zones between BIND 9

Look at BIND 9.7.2-P2 in which you have the "rndc addzone" and "rndc delzone" statements that allow you to "remotely" add and remove zones from a running server.

I have a paper that provides some examples that I gave at NANOG last month.

ftp://ftp.isc.org/isc/pubs/pres/NANOG/50/DNSSEC-NANOG50.pdf

While this won't go back and clean up any mess that you have currently, it does make it really easy to synchronize machines that you are able to manage using "rndc" going forward.

[yes, responding to a rather old post, but BIND 9.7.2-P2 is cool enough to warrant it]

Adding yet another update (years after the fact, but hoping that it helps folks that run across this in search results), I'd like to recommend the use of Catalog zones.

Catalog zones, introduced in BIND 9.11 (2018) allow automatic provisioning of zones (addition and deletion) through a special zone that is shared among the primary and secondary servers.

For full information, see: https://kb.isc.org/docs/aa-01401


I don't know of any way to do this natively to bind9 if you're using flatfile backend. There are various DB-backed systems which can help automate it. Or you can script it:

I populate a text file with a list of zones and the primary NS IP for the zone, and stick it on a website that I allow my slaves access to. The slaves fetch this file periodically, and if it has changed they parse it generate a named.conf, and tell bind to reload configs. It's "automatic" in the sense that I don't have to manually ssh to my secondaries and update configs, but it's still external to bind9.

You could also use a higher level configuration management system such as puppet, to manage your entire DNS infrastructure. That's a bit more complicated though.


Maybe you're looking for a configuration management system like Puppet or CFEngine? There's extra infrastructure involved, but they can handle distributing a lot of configuration stuff, and could easily include this too.

Tags:

Bind

Dns Zone