Quick reverse DNS lookup how to in CLI (command line interface)

February 5, 2008 by tibor 

A reverse DNS query is where you know the IP address and would like to know what domain name is tied to that IP. I have been using http://www.dnsstuff.com/ for a while now and have been happy with their product, which is online DNS queries, but they turned to a pay model recently. Unfortunately, I don’t use them enough to warrant paying their yearly fees. Here is where the “host” command comes to the rescue.

Usage example:
host 64.233.187.99
99.187.233.64.in-addr.arpa domain name pointer jc-in-f99.google.com.

Host –info:
Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]
[-R number] [-m flag] hostname [server]
-a is equivalent to -v -t ANY
-c specifies query class for non-IN data
-C compares SOA records on authoritative nameservers
-d is equivalent to -v
-l lists all hosts in a domain, using AXFR
-i IP6.INT reverse lookups
-N changes the number of dots allowed before root lookup is done
-r disables recursive processing
-R specifies number of retries for UDP packets
-s a SERVFAIL response should stop query
-t specifies the query type
-T enables TCP/IP mode
-v enables verbose output
-w specifies to wait forever for a reply
-W specifies how long to wait for a reply
-4 use IPv4 query transport only
-6 use IPv6 query transport only
-m set memory debugging flag (trace|record|usage)

The “host” command combined with “dig” will save me $36/year. :-)

Comments

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.