dig (as known as “domain internet groper”) is a utility that can talk directly to name servers in order to gather detailed domain name related information.
DNS is used to resolve a host name or alias into IP address,so that your computer can find the resource you’re looking for. However, it’s also possible to supply reverse information — to find the host name associated with a numeric IP address. This is called “reverse-resolving” or “reverse DNS” or “PTR” record. PTR is much helpful when you are sending out mails, some anti-spam gateways check PTR records to identify spamers.
We can use dig to find out whether any given IP address has a PTR record or not. To do a PTR lookup with dig, we must first convert the IP address into a host-name-like construct by reversing the order of the octets and then appending a suffix “.in-addr.arpa” — for example, given the address 201.202.203.204 we transform this address into a strings “204.203.202.201.in-addr.arpa” and then use it with the “dig ptr” command:
admon:~ google$ dig ptr 204.203.202.201.in-addr.arpa
[...bla bla bla...]
;; ANSWER SECTION:
204.203.202.201.in-addr.arpa. 1200 IN PTR linux.www.admon.org.
[...bla bla bla...]
We got our answer in the answer section: linux.www.admon.org.
If you use command “host”, things may be much easier, and the command is: “host 201.202.203.204″
No related posts.











In this case, the command host would be much easier. You just need to run “host 123.123.123.123″
I`m have make an web page to perform reverse lookup and find PTR records http://www.magic-net.nl/dns-and-ip-tools.php
While searching for Blogs about Howto use dig check PTR record | Planet Admon I found your site. Thank you for the effort you have put in.
You can use:
dig -x IP
For example:
dig -x 201.202.203.204