Index: [Article Count Order] [Thread]

Date:  Tue, 23 Oct 2007 22:08:36 +0200
From:  =?ISO-8859-1?Q?Ren=E9_M=F8lsted?= <molsted (at mark)>
Subject:  [coba-e:10936] Re: DNS Question
To:  coba-e (at mark)
Message-Id:  <8B5E9DC9-1A63-4746-B115-017F5000626D (at mark)>
In-Reply-To:  <005101c81592$5f6fa560$010510ac@gregg>
References:  <002201c81537$ed309db0$7001a8c0 (at mark) cyberec> <e74001c8156a$834d7f70$0601a8c0 (at mark) systemax> <58330498.20071023095129 (at mark)> <005101c81592$5f6fa560$010510ac (at mark) gregg>
X-Mail-Count: 10936

On 23/10/2007, at 18.32, Gregg wrote:

> Is there a way to pull all zones form a primary dns server to a  
> secondary dns server?
> I have a few BQs running, and one of them I'm using as primary, and  
> another as secondary, but I'm having to manually add the domain  
> names to the secondary each time I add a new domain to the primary,  
> so my question is, can the secondary just pull all the domain  
> information from the primary? If BQ can't do that, will a windows  
> server be able to pull all the information from a primary?
> Thanks.

I wouldn't say that I have the solution but merely a hint.
This line whould generate a named.conf
for domain in $(egrep ^zone /etc/named.conf | cut -d"\"" -f2 | sort);  
do echo "zone \"$domain\" { type slave; file \"sec.$domain\"; masters  
{ IP_OF_MASTER; }; };"; done

Don't forget to put this at the very top of named.conf
options { directory "/etc/named"; };
zone "." { type hint; file "db.cache"; };

As far as I understand the sec.-files are generated automatically -  
correct me if I'm wrong - once bind is restarted.