DNS Cleanup

Rich Parkin RParkin at ldmi.com
Wed Jul 14 21:24:15 UTC 2004


I've got a couple of unpolished Perl scripts I've been meaning to clean
up and make more usable.  Both scripts require Perl (5) and the Net::DNS
module.

The first one takes a text listing of zones as input, recursively finds
the authoritative nameserver, then uses that to find the MX records for
the zone and dumps the results (nameservers and MX's) to standard
output.

The second one parses through the named.conf file and any includes to
read in all of the zones, then does a recursive lookup to find the
nameservers for each zone.  If the zone's real nameservers don't match
any of the ones you specify (yours), it will spit out what they are.  If
any of them match even one of yours, it passes over it and prints
nothing.

Neither of them actively modify the configuration files - they
basically just report - but I could graft that in if need be or adapt
another script to do the job.  I'm no Perl guru but I'm willing to share
my scripts, and I'm willing to work on improving them for general use.

Richard Parkin
System Administrator
CCNA
Data Center Operations
LDMI Telecommunications

>>> Dan Mahoney <google at gushi.org> 7/13/2004 9:01:57 PM >>>
Hi all.

Does anyone know of a script that can troll through a list of domains,
or a named.conf file, and check if a server has *anything* to do with
it.

I'm essentially looking to go through the 3000-or-so domains I have,
many of which are no longer on our network, and clean it out.

-Dan Mahoney



More information about the bind-users mailing list