checking dns records from named.conf

Adam Maloney adamm at sihope.com
Mon Jul 21 10:12:26 PDT 2003


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-isp
> To unsubscribe, send any mail to "freebsd-isp-unsubscribe at freebsd.org"
> 



More information about the freebsd-isp mailing list