- Forums
- Linux Commands
- Linux Command DNS Lookup Utility
if you want to use a linux command to provide a reverse lookup of an ip address you can use the dig command for example you can dig the yahoo ip address [845], Last Updated: Mon Jun 24, 2024
Hostman
Wed Mar 31, 2010
0 Comments
456 Visits
if you want to use a linux command to provide a reverse lookup of an IP address you can use the dig command for example you can dig the yahoo ip address
forward lookup maps the hostname to IP address, and reverse lookup maps the IP address into hostname. dig is a DNS lookup utility shich sends the query to DNS server
so lets say for example i send this command
# dig -x 72.30.2.43
this is what the output of the command would look like from the shell
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.1 <<>> -x 72.30.2.43
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51079
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 0
;; QUESTION SECTION:
;43.2.30.72.in-addr.arpa. IN PTR
;; ANSWER SECTION:
43.2.30.72.in-addr.arpa. 1200 IN PTR ir1.fp.vip.sk1.yahoo.com.
;; AUTHORITY SECTION:
2.30.72.in-addr.arpa. 172800 IN NS ns4.yahoo.com.
2.30.72.in-addr.arpa. 172800 IN NS ns1.yahoo.com.
2.30.72.in-addr.arpa. 172800 IN NS ns2.yahoo.com.
2.30.72.in-addr.arpa. 172800 IN NS ns5.yahoo.com.
2.30.72.in-addr.arpa. 172800 IN NS ns3.yahoo.com.
;; Query time: 201 msec
;; SERVER: 208.74.8.101#53(208.74.8.101)
;; WHEN: Wed Mar 31 21:12:17 2010
;; MSG SIZE rcvd: 169