Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 172012

How to perform a reverse DNS lookup in Linux


To perform a reverse DNS lookup for a domain in Linux, you can use the dig command, e.g.

# dig -x

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

;          IN      PTR

;; ANSWER SECTION:   86328   IN      PTR