Using dig for checking domain registration
Mark Andrews
marka at isc.org
Tue Jun 30 00:42:52 UTC 2009
In message <BA25C9BB-29D5-4771-BCAD-4F6A34F693B4 at newgeo.com>, Scott Haneda writ
es:
> On Jun 29, 2009, at 5:08 PM, Mark Andrews wrote:
>
> > In message <76610622-42BA-4ED3-B945-14F6C6796A65 at newgeo.com>, Scott
> > Haneda writ
> > es:
> >> I have been using the below command to determine if a domain is
> >> registered. I use this for an internal audit of what clients have
> >> come and gone, and what DNS records I need to clean up.
> >>
> >> dig example.com NS +trace -4 @4.2.2.1 | grep -i ns1.example.com
> >>
> >> I run it also with ns2.example.com in the grep to make certain my
> >> primary and secondary are listed.
> >>
> >> My current trouble is that I am getting intermittent failures if the
> >> domain is not a tld of .com, .net, .org.
> >>
> >> $dig customtruckgraphics.us NS +trace -4 @4.2.2.1 +short
> >> NS F.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS M.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS G.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS E.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS D.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS L.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS C.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS K.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS I.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS J.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS A.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS B.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> NS H.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
> >> dig: couldn't get address for 'J.GTLD.BIZ': not found
> >
> > J.GTLD.BIZ only has a IPv6 addresses.
> >
> >> Can someone explain to me what is happening here, and also, provide a
> >> suggestion on how to best test for the conditions I am after?
> >
> > You need to run a version of dig with this bug fix or just re-try.
> >
> > 2517. [bug] dig +trace with -4 or -6 failed when it
> > chose a
> > nameserver address of the excluded address.
> > [RT #18843]
> >
> > Which should read.
> >
> > 2517. [bug] dig +trace with -4 or -6 failed when it
> > chose a
> > nameserver address of the excluded address
> > type.
> > [RT #18843]
> >
> > Alternatively do "dig ns parent.zone", then
> > "dig +norec ns child.zone @parent-server".
>
>
> Hi Mark, thanks for the reply. I do not understand your last
> suggestion. If the domain in question is customtruckgraphics.us, can
> you show me an example of how to do this?
% dig ns us
; <<>> DiG 9.3.6-P1 <<>> ns us
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38654
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 6
;; QUESTION SECTION:
;us. IN NS
;; ANSWER SECTION:
us. 518400 IN NS a.gtld.biz.
us. 518400 IN NS i.gtld.biz.
us. 518400 IN NS c.gtld.biz.
us. 518400 IN NS b.gtld.biz.
us. 518400 IN NS j.gtld.biz.
us. 518400 IN NS k.gtld.biz.
;; ADDITIONAL SECTION:
a.gtld.biz. 516703 IN A 209.173.53.162
b.gtld.biz. 516685 IN A 209.173.57.162
c.gtld.biz. 516677 IN A 209.173.60.65
i.gtld.biz. 516687 IN A 156.154.96.126
k.gtld.biz. 516672 IN A 156.154.72.65
j.gtld.biz. 516601 IN AAAA 2001:503:a124:ffff:ffff:ffff:ffff:ff7e
;; Query time: 438 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jun 30 10:32:37 2009
;; MSG SIZE rcvd: 232
% dig +norec customtruckgraphics.us ns @a.gtld.biz
; <<>> DiG 9.3.6-P1 <<>> +norec customtruckgraphics.us ns @a.gtld.biz
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22320
;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
;customtruckgraphics.us. IN NS
;; AUTHORITY SECTION:
customtruckgraphics.us. 7200 IN NS NS1.OCTANEDNS.COM.
customtruckgraphics.us. 7200 IN NS NS2.OCTANEDNS.COM.
;; Query time: 242 msec
;; SERVER: 209.173.53.162#53(209.173.53.162)
;; WHEN: Tue Jun 30 10:33:22 2009
;; MSG SIZE rcvd: 89
%
> As to the versions, I would not be onjectionable to updating, how do I
> tell which version of dig is on the machine,
Look in the comments. I used dig from 9.3.6-P1 to make the above
queries.
> as well as where to find the version that addresses the two bugs listed
> above?
One bug actually. The ISC web site.
> I can not
> rebuild named entirely, as it was enough trouble getting DLZ working
> on RHEL. I would just need to fish out dig, and build that separate.
I suspect you will find it easier to just fully upgrade.
You may need to go find test rpms. I'm not a Linux guy but
I'm sure they shouldn't be hard to find or for that matter
convert a existing source on.
Mark
> Thank you.
> --
> Scott * If you contact me off list replace talklists@ with scott@ *
>
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: marka at isc.org
More information about the bind-users
mailing list