Zone include files?

Planet X Mail elitescripts2000 at yahoo.com
Wed Jan 5 08:37:59 UTC 2005


Here is some useful zone file formatting if your managing a vhosting
environment.

In my named.conf I have:

include "/etc/named/zones.conf";

And my zones.conf  file looks like this...

zone "4abetterlife.com" { type master; file "gojiman_4abetterlife.com.db";
allow-update { key update-key; }; };
zone "bandjletempt.com" { type master; file "bear_bandjletempt.com.db";
allow-update { key update-key; }; };
zone "bogusdomain.com" { type master; file "demo_bogusdomain.com.db";
allow-update { key update-key; }; };
zone "brileyswarehouse.net" { type master; file
"mjbriley_brileyswarehouse.net.db"; allow-update { key update-key; }; };
zone "digipanel.com" { type master; file "digipanel_digipanel.com.db";
allow-update { key update-key; }; };
zone "dns4free.us" { type master; file "mig29_dns4free.us.db"; allow-update {
key update-key; }; };
zone "dumb.com" { type master; file "dumb_dumb.com.db"; allow-update { key
update-key; }; };


etc etc...

As you can see there is one zone entry PER LINE.. that way All I have to do to
remove an entry is: 

cat /etc/named/zones.conf | grep -v '^zone "dumb.com"' 

Or to ADD a zone entry:

echo 'zone "new.com" { type master; file "new_new.com.db"; allow-update { key
update-key; }; };' >> /etc/named/new_zone.conf

That way named.conf is NEVER touched.



> /etc/named/new_zone.conf

--- Gregory Hicks <ghicks at cadence.com> wrote:

> 
> > From: "Jim McAtee" <jmcatee at mediaodyssey.com>
> > To: <bind-users at isc.org>
> > Subject: Zone include files?
> > Date: Tue, 4 Jan 2005 16:18:29 -0700
> > 
> > Is there an include directive in BIND 9 that can be used within zone 
> > files?
> 
> $INCLUDE <file-name>
> 
> > 
> > 
> 
> -------------------------------------------------------------------
> I am perfectly capable of learning from my mistakes.  I will surely
> learn a great deal today.
> 
> "A democracy is a sheep and two wolves deciding on what to have for
> lunch.  Freedom is a well armed sheep contesting the results of the
> decision." - Benjamin Franklin
> 
> "The best we can hope for concerning the people at large is that they
> be properly armed." --Alexander Hamilton
> 
> 
> 
> 



More information about the bind-users mailing list