Reverse DNS Lookup with Dig

Reverse DNS, in simple explanation it means that resolve your IP address into hostname. Nowaday it became a must have requirement for mail server’s IP address. It is also one of the method to determine your mail server IP is glue to the hostname.

Here is how to find out the reverse DNS IP address is pointed to which DNS server for zone delegation.

dig -x

; <<>> DiG 9.6.0-APPLE-P2 <<>> -x
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21938
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;   IN      PTR

;; AUTHORITY SECTION:   10800   IN      SOA 2011012113 10800 3600 604800 86400

;; Query time: 37 msec
;; WHEN: Sat Jan 22 19:39:12 2011
;; MSG SIZE  rcvd: 111

The result above shown

  • The SOA record shown the IP Address is pointed to for reverse DNS delegation.
  • The zone is delegating the IP

This command is pretty useful when you want to find out is the reverse DNS delegation works correctly.