root server query question

Christopher.Lee at uboc.com Christopher.Lee at uboc.com
Thu Apr 28 19:05:54 UTC 2005


Hello,

Thanks.  Should have known to look in CPAN you can find everything there.
I already have a simple script working.  :-)

One question about how this works behind the screen.  I just want to make
sure it is doing this correctly...

If I do a query to get the NS records like so:

use Net::DNS;
my $res   = Net::DNS::Resolver->new(Verbose => 1);
my $query = $res->query("uboc.com", "NS");

if ($query) {
    foreach $rr (grep { $_->type eq 'NS' } $query->answer) {
        print $rr->nsdname, "\n";
    }
} else {
    warn "query failed: ", $res->errorstring, "\n";
}

It appears that it is getting this information from my name servers and not
from the root servers because I know we have some differences right now
that I need to update.  How do I get it to give me a list of the NS records
listed at the root servers and not the ones I advertise in my zone file.
Would I have to do the query from a server that does not use my DNS server
for resolution?  I am wondering since I am doing it on my network it see I
am authoratative and uses what is in the zone file instead of going out and
asking the root servers?  I tried adding the "verbose" parameter but that
did not seem to add any output on what it was doing.

-chrisl


---
Christopher M. Lee
Internet Systems Specialist
Enterprise Web Engineering & Support
Union Bank of California

christopher.lee at uboc.com
323-720-2031 (phone)
323-888-0824 (fax)




                                                                                                                                             
                      tforeman at ibsys.co                                                                                                      
                      m                        To:       Christopher.Lee at uboc.com, bind-users at isc.org                                        
                                               cc:                                                                                           
                      04/28/2005 11:42         Subject:  RE: root server query question                                                      
                      AM                                                                                                                     
                                                                                                                                             




Perl has some DNS modules that I have used for this.

http://search.cpan.org/~olaf/Net-DNS-0.49/lib/Net/DNS.pm

--Tim

-----Original Message-----
From: Christopher.Lee at uboc.com [mailto:Christopher.Lee at uboc.com]
Sent: Thursday, April 28, 2005 1:17 PM
To: bind-users at isc.org
Subject: root server query question


Hello,

I have a lot of domains that we manage and different departments purchase
and renew the domains.  I am trying to build a tool to do some of the stuff
that you find on dnsreport.com.  An example would be that I want to check
if the root servers have the correct DNS servers listed.  I basically want
to have a tool that I can run as a job against all the domains on my DNS
server and get this information so I can see if anything has changed or
someone has moved a website without contacting us.  I have some Perl
programming skills so if someone can direct me to similar code or example I
can go from there.

-chrisl


---
Christopher M. Lee

****************************************************************************

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose,
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.



******************************************************************************
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



More information about the bind-users mailing list