Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2003 12:12:23 -0500 (CDT)
From:      Adam Maloney <adamm@sihope.com>
To:        Evren Yurtesen <yurtesen@ispro.net.tr>
Cc:        freebsd-isp@freebsd.org
Subject:   Re: checking dns records from named.conf
Message-ID:  <Pine.BSI.4.05L.10307211208590.13779-100000@unix1.sihope.com>
In-Reply-To: <20030721165525.L21521@finland.ispro.net.tr>

next in thread | previous in thread | raw e-mail | index | archive | help
Something like:

for DOMAIN in `cat /etc/named.conf | grep "zone" | awk '{ print $2 }' |
sed s/\"//g`; do dig @f.gtld-servers.net $DOMAIN | grep "ns1.ispro.net.tr"
2>&1 > /dev/null || echo "$DOMAIN not pointed here"; done

(untested, but basically what I've done in the past whenever I need taht).
For each domain in named.conf, query the root-servers for the authorative
NS records (ns1.ispro.net.tr should be replaced with your primary
nameserver).  Then if the grep does not succeed (your nameserver not in
the output) then echo the domain so we know about it.

May take some tweaking.

Adam Maloney
Systems Administrator
Sihope Communications


On Mon, 21 Jul 2003, Evren Yurtesen wrote:

> I have about 1000 domain names in my named.conf file.
> I wonder if it would be possible to check the validity of these domains
> or even if they are pointing to my name server or not easily...
> Is there a ready script or something somebody knows here?
> Thanks
> 
> Evren
> _______________________________________________
> freebsd-isp@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-isp
> To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.4.05L.10307211208590.13779-100000>