Bind include all zones in a folder

binddomain-name-system

I have a webapp that acts as a DNS manager, writing all zones to "/var/named". I would like to be able to configure named to load all zones in that folder, without explicitely having to tell it which zone goes to which file.

Is that remotely possible?

The reason for this is that i will be having a lot of zones added/deleted and a lot of records for each of them. I was thinking for using a database for that, but the idea of doing 500 record inserts scares me (it needs to be snappy). It's easier to write to a file.

Any suggestions?

Best Answer

As the problem is stated, this is not possible with bind9. However, the problem really is to do with how you can make significant changes to which zones you are serving for, without a performance hit.

Possible suggestions are:

  • dynamically loadable zones with bind9

  • bind10 (but this is not mature, you probably don't want to rely on it for critical production environments)

  • another dns server, such as powerdns. If you're using the default recommended schema for a SQL backend to powerdns, it will serve all of the zones in the domains table, so if you can have your "dns manager" update that table then you're in business. At the very least, an immediatge, kludgy workaround would be to have powerdns's zone2sql tool take the zone files that your dns manager app creates and insert them into the db.

Related Topic