Posted by: jasonk2600 | November 21, 2009

Quickie HowTo – Reverse DNS Lookups with Dig

Finding out the domain name associated with an IP address is just as simple as finding out the IP address associated with a domain name.  This can be done on most any UNIX, Linux, or BSD system without the need to install any additional software.  Simply invoke the dig utility with the –x command line option, followed by the IP address.

In the example below, dig performs a reverse DNS lookup on 74.125.127.147 and shows that its domain name is pz-in-f147.1e100.net.

# dig -x 74.125.127.147

; <<>> DiG 9.6.1-P1 <<>> -x 74.125.127.147
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24446
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;147.127.125.74.in-addr.arpa.   IN      PTR

;; ANSWER SECTION:
147.127.125.74.in-addr.arpa. 72182 IN   PTR     pz-in-f147.1e100.net.

;; Query time: 31 msec
;; SERVER: 68.87.69.150#53(68.87.69.150)
;; WHEN: Sat Nov 21 10:36:37 2009
;; MSG SIZE  rcvd: 79

 

  [EoF]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: