HOW TO DETERMINE ALL ZONE FILES ON SERVER?
Jobe Bittman
jobe at tns.net
Wed Dec 5 20:29:03 UTC 2001
I use this little dittie in perl:
open(X,"/pathto/named.conf");
$y=join("",<X>);
while($y=~s/zone\s+"([^"]+)"\s*(?:in)?\s*{\s*type\s+([^;h]+);//sm){
print"$1,$2\n"
I don't know what you named.conf looks like but I think it should work for
you. It outputs a list of domains like so:
domain1.com,master
domain2.com,master
domain3.com,slave
domain4.com,master
easily greppable, awkable. then you use your domain lists to generate a new
named.conf, for input to a dig zone sucking script, or whatever.
At 07:49 PM 12/5/2001 +0000, you wrote:
>In article <9ulke3$8gs at pub3.rc.vix.com>, Gustave <gustave at lightsign.com>
>wrote:
> >How can I determine all of the domains that a name server is responsible
> >for?
>
>grep '^zone' /etc/named.conf
>
>Unless the sysadmin has configured restrictive permissions on the
>named.conf file, you shouldn't need root access to do this.
>
> >We are moving some name servers and consolidating others. I do not have
> >root access to all so I want to query the ones that I do not have access
> >to to get all records they contain.
>
>If the server allows zone transfers:
>
>dig <domain> axfr @<server>
>
>--
>Barry Margolin, barmar at genuity.net
>Genuity, Woburn, MA
>*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
>Please DON'T copy followups to me -- I'll assume it wasn't posted to the
>group.
More information about the bind-users
mailing list