Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have set up a BIND9 on a Linux box and I'm playing with the nsupdate command for some time now. It works pretty good for changing a zone's RR (commands update create and update delete). I am wondering how new zones should be created. There seems no way that nsupdate can do this.

So far, I've always copied an existing zone file and changed it afterwards. However, I am looking for a less painful way. I am interested how you guys do that.

share|improve this question
add comment

2 Answers

There seems to be no other way than copying some skeleton file (don't use FQDNs in this skeleton, and the same file will fit for any new zone).

Newer BINDs have rndc addzone command which permanently adds zone to bind configuration without adding it to named.conf and without reloading/reconfiguring BIND (zone file should already exist before you run rndc addzone).

I use script that copies zone "skeleton" to some new permanent location and then runs the appropriate rndc addzone.

share|improve this answer
1  
be aware that this requires the option allow-new-zones yes; to be set, by default it is (currently) set to no –  faker Apr 5 '12 at 9:03
add comment

I always scripted mine. Wrote out a skeleton zone file, added the zone to the config, reloaded BIND, done. Script could be triggered manually, automatically by another piece of automation over SSH, via web service, or anything else that can invoke a command.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.