How to configure DNS Lookup Utilities in Linux.

In Linux,we have multiples command & tools to find the IP address of a certain domain name. The outputs will include the IP addresses in the DNS records received from the name servers.DNS Lookup provides information about specified domain records as well as information about DNS entries.

DNS Lookup Utilities
host Command:
  • It is a command line utility for carrying out DNS lookups, It translates host names to IP addresses and vice versa.

host google.com
Here is the command output.

174.208.58.216.in-addr.arpa    name = lhr25s09-in-f14.1e100.net.
174.208.58.216.in-addr.arpa    name = lhr25s09-in-f174.1e100.net.
174.208.58.216.in-addr.arpa    name = mil07s10-in-f14.1e100.net.

Authoritative answers can be found from:

Domain information groper (dig) Command:
  • It is used to query DNS related information such as A Record, CNAME, MX Record.

dig google.com

 Here is the command output.

; <<>> DiG 9.16.1-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20121
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.			IN	A

;; ANSWER SECTION:
google.com.		158	IN	A	142.250.193.14

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Jul 06 17:19:14 IST 2021
;; MSG SIZE  rcvd: 55
NSLookup Command:
  • It is a command line utility & used to query DNS resource records (RR).

nslookup google.com

 Here is the command output.

Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	google.com
Address: 142.250.193.14
Name:	google.com
Address: 2404:6800:4002:819::200e
nmap ip-address
Here is the command output.

 

174.208.58.216.in-addr.arpa	name = lhr25s09-in-f14.1e100.net.
174.208.58.216.in-addr.arpa	name = lhr25s09-in-f174.1e100.net.
174.208.58.216.in-addr.arpa	name = mil07s10-in-f14.1e100.net.

Authoritative answers can be found from:

 

 

Leave a Reply