Reverse DNS lookup (also known as rDNS) is a process to determine the hostname associated with a given IP address.
Typically, the DNS is used to determine what IP address is associated with a given hostname; so to reverse resolve a known IP address is to lookup what the associated hostname for it. A reverse lookup is often referred to simply as reverse resolving, or more specifically reverse DNS lookups.
The most common uses of the reverse DNS are:
- Network troubleshooting
- Avoid spammers and phishers using a forward confirmed reverse DNS etc
Task: Find Reverse DNS for IP 220.127.116.11 under Linux/UNIX
Type the following host command:
$ host ip-address-here
$ host 18.104.22.168
22.214.171.124.in-addr.arpa domain name pointer cyberciti.org.
In this example output, IP 126.96.36.199 is reverse mapped to cyberciti.org. Here is another reverse lookups done using dig command:
$ dig -x ip-address-here
$ dig -x 188.8.131.52
; <<>> DiG 9.8.3-P1 <<>> -x 184.108.40.206 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39113 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;220.127.116.11.in-addr.arpa. IN PTR ;; ANSWER SECTION: 18.104.22.168.in-addr.arpa. 20975 IN PTR www.cyberciti.biz. ;; Query time: 32 msec ;; SERVER: 22.214.171.124#53(126.96.36.199) ;; WHEN: Sat Feb 8 04:40:28 2014 ;; MSG SIZE rcvd: 76
Hiding additional display info while doing reverse ip lookup using dig command
You can only display the answer section of a reply with +answer option and clear all other display info with +noall option as follow:
dig +noall +answer -x 188.8.131.52
184.108.40.206.in-addr.arpa. 80127 IN PTR www.cyberciti.biz.
Task: Find Reverse DNS for IP 220.127.116.11 under Linux/UNIX/Windows
nslookup works under Windows and UNIX like oses:
Server: 18.104.22.168 Address: 22.214.171.124#53 Non-authoritative answer: 126.96.36.199.in-addr.arpa name = cyberciti.org. Authoritative answers can be found from: