Very often problems like ‘my website is not working’ or ‘I did not get any emails’ are caused by improperly set up dns records or expired domain. At my work, I’m permanently dealing with incorrectly set up dns records. There are available services like intodns.com which you can use to check dns records for domain. But what to do, if you have problem with reverse dns? Or you want to check, if your reverse delegation is set up correctly?
Here dig command with +trace options comes to help:
+trace
Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled
by default. When tracing is enabled, dig makes iterative queries to resolve the name being looked up. It will
follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup.
For example, to check reverse delegation for ip 93.184.71.5
dig +trace 5.71.184.93.in-addr.arpa PTR
prints
; <<>> DiG 9.5.1-P2.1 <<>> +trace 5.71.184.93.in-addr.arpa PTR
;; global options: printcmd
. 341417 IN NS e.root-servers.net.
. 341417 IN NS k.root-servers.net.
. 341417 IN NS a.root-servers.net.
. 341417 IN NS h.root-servers.net.
. 341417 IN NS g.root-servers.net.
. 341417 IN NS d.root-servers.net.
. 341417 IN NS f.root-servers.net.
. 341417 IN NS j.root-servers.net.
. 341417 IN NS c.root-servers.net.
. 341417 IN NS m.root-servers.net.
. 341417 IN NS i.root-servers.net.
. 341417 IN NS b.root-servers.net.
. 341417 IN NS l.root-servers.net.
;; Received 500 bytes from 10.0.0.1#53(10.0.0.1) in 1 ms
93.in-addr.arpa. 86400 IN NS SNS-PB.ISC.ORG.
93.in-addr.arpa. 86400 IN NS NS-PRI.RIPE.NET.
93.in-addr.arpa. 86400 IN NS SEC1.APNIC.NET.
93.in-addr.arpa. 86400 IN NS SUNIC.SUNET.SE.
93.in-addr.arpa. 86400 IN NS SEC3.APNIC.NET.
93.in-addr.arpa. 86400 IN NS NS2.LACNIC.NET.
93.in-addr.arpa. 86400 IN NS NS3.NIC.FR.
93.in-addr.arpa. 86400 IN NS TINNIE.ARIN.NET.
;; Received 246 bytes from 2001:503:ba3e::2:30#53(a.root-servers.net) in 129 ms
71.184.93.in-addr.arpa. 172800 IN NS ns.vnet.sk.
71.184.93.in-addr.arpa. 172800 IN NS ns2.vnet.sk.
;; Received 84 bytes from 2001:500:13::c7d4:35#53(TINNIE.ARIN.NET) in 156 ms
5.71.184.93.in-addr.arpa. 43200 IN CNAME 5.0/26.71.184.93.in-addr.arpa.
0/26.71.184.93.in-addr.arpa. 43200 IN NS ns3.lanechange.net.
0/26.71.184.93.in-addr.arpa. 43200 IN NS e.ns.lanechange.info.
0/26.71.184.93.in-addr.arpa. 43200 IN NS ns2.lanechange.net.
0/26.71.184.93.in-addr.arpa. 43200 IN NS ns4.lanechange.net.
0/26.71.184.93.in-addr.arpa. 43200 IN NS ns1.lanechange.net.
;; Received 183 bytes from 217.73.16.2#53(ns2.vnet.sk) in 14 ms
Looks good. We have reply, that 5.71.184.93.in-addr.arpa
is CNAME to 5.0/26.71.184.93.in-addr.arpa
So we try
dig +trace 5.0/26.71.184.93.in-addr.arpa PTR
which will output
; <<>> DiG 9.5.1-P2.1 <<>> +trace 5.0/26.71.184.93.in-addr.arpa PTR ;; global options: printcmd . 341057 IN NS f.root-servers.net. . 341057 IN NS j.root-servers.net. . 341057 IN NS i.root-servers.net. . 341057 IN NS h.root-servers.net. . 341057 IN NS b.root-servers.net. . 341057 IN NS m.root-servers.net. . 341057 IN NS k.root-servers.net. . 341057 IN NS a.root-servers.net. . 341057 IN NS g.root-servers.net. . 341057 IN NS l.root-servers.net. . 341057 IN NS e.root-servers.net. . 341057 IN NS c.root-servers.net. . 341057 IN NS d.root-servers.net. ;; Received 500 bytes from 10.0.0.1#53(10.0.0.1) in 1 ms 93.in-addr.arpa. 86400 IN NS SEC1.APNIC.NET. 93.in-addr.arpa. 86400 IN NS SEC3.APNIC.NET. 93.in-addr.arpa. 86400 IN NS NS3.NIC.FR. 93.in-addr.arpa. 86400 IN NS SUNIC.SUNET.SE. 93.in-addr.arpa. 86400 IN NS NS-PRI.RIPE.NET. 93.in-addr.arpa. 86400 IN NS SNS-PB.ISC.ORG. 93.in-addr.arpa. 86400 IN NS TINNIE.ARIN.NET. 93.in-addr.arpa. 86400 IN NS NS2.LACNIC.NET. ;; Received 251 bytes from 192.112.36.4#53(g.root-servers.net) in 49 ms 71.184.93.in-addr.arpa. 172800 IN NS ns2.vnet.sk. 71.184.93.in-addr.arpa. 172800 IN NS ns.vnet.sk. ;; Received 89 bytes from 2001:500:13::c7d4:35#53(TINNIE.ARIN.NET) in 157 ms 0/26.71.184.93.in-addr.arpa. 43200 IN NS e.ns.lanechange.info. 0/26.71.184.93.in-addr.arpa. 43200 IN NS ns2.lanechange.net. 0/26.71.184.93.in-addr.arpa. 43200 IN NS ns4.lanechange.net. 0/26.71.184.93.in-addr.arpa. 43200 IN NS ns1.lanechange.net. 0/26.71.184.93.in-addr.arpa. 43200 IN NS ns3.lanechange.net. ;; Received 167 bytes from 217.73.16.2#53(ns2.vnet.sk) in 7 ms 5.0/26.71.184.93.in-addr.arpa. 86400 IN PTR dl5.eset.com. 0/26.71.184.93.in-addr.arpa. 259200 IN NS e.ns.lanechange.info. 0/26.71.184.93.in-addr.arpa. 259200 IN NS ns1.lanechange.net. 0/26.71.184.93.in-addr.arpa. 259200 IN NS ns2.lanechange.net. 0/26.71.184.93.in-addr.arpa. 259200 IN NS ns3.lanechange.net. 0/26.71.184.93.in-addr.arpa. 259200 IN NS ns4.lanechange.net. ;; Received 273 bytes from 64.79.219.248#53(ns1.lanechange.net) in 121 ms
It seems, all is OK 🙂