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.

Is there an easy way to put some kind of variables into bind9 zone files?

Lets say i have a bunch of different zone-files, and i would like to define my ip's in one config file. So that i can make something like

www A $mywebserverip

I'm allready using CNAME records for this kind of things, but this is only working for subdomains, but not for the main domain's A records.

I'm more interested in some kind of script language that would generate the zone files for me and allow a single config place for ip-logic.

share|improve this question
add comment

1 Answer

If you keep all hostname -> IP mappings the same across zones, you can simply make all data in the zone file relative.

There are no built-in ways to script this, no.

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.