Best implementation of many zonfiles containing the same info (to avoid duplicate IP-nr)

Paul Colquhoun postmaster at andor.dropbear.id.au
Fri Sep 8 23:49:04 UTC 2006


On 8 Sep 2006 08:45:09 -0700, news at teknologia.com <news at teknologia.com> wrote:
| $INCLUDE seems to work but if the IP-nr change you still need to change
| the serial number in each zone-file and restart bind to get it to work.
|
|
| I know you can script such things but it would be so pleasant if the
| only thing you need to do was to change the IP-nr in one single place.
| CNAME would do it but is impossible to use.
|
| Other suggestions?


When you write the 'zone' config section for each domain in the config
file, point to the same file for each domain, like this:


zone "domain-1.com" IN {
        type master;
	file "data/common.zone";
};

zone "domain-2.com" IN {
        type master;
	file "data/common.zone";
};


Make sure you use the '@' symbol in the data/common.zone file, and rely
on the domain auto-complete feature (i.e. leave the domain off the end
of any references, and don't use a trailing '.' character).

All the domains will have identical SOA data, as well as identical
hostnames, IP addresses, etc.


-- 
Reverend Paul Colquhoun, ULC.    http://andor.dropbear.id.au/~paulcol
     Asking for technical help in newsgroups?  Read this first:
        http://catb.org/~esr/faqs/smart-questions.html#intro



More information about the bind-users mailing list