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.

Jun 162013
 

How to trace DNS from the root servers

Answer:

Use the command `dig`, e.g.

dig +trace mit.edu

;; global options: +cmd
.			19927	IN	NS	d.root-servers.net.
.			19927	IN	NS	e.root-servers.net.
.			19927	IN	NS	m.root-servers.net.
.			19927	IN	NS	l.root-servers.net.
.			19927	IN	NS	a.root-servers.net.
.			19927	IN	NS	k.root-servers.net.
.			19927	IN	NS	f.root-servers.net.
.			19927	IN	NS	j.root-servers.net.
.			19927	IN	NS	b.root-servers.net.
.			19927	IN	NS	h.root-servers.net.
.			19927	IN	NS	g.root-servers.net.
.			19927	IN	NS	i.root-servers.net.
.			19927	IN	NS	c.root-servers.net.
;; Received 228 bytes from 8.8.8.8#53(8.8.8.8) in 12 ms

edu.			172800	IN	NS	a.edu-servers.net.
edu.			172800	IN	NS	c.edu-servers.net.
edu.			172800	IN	NS	d.edu-servers.net.
edu.			172800	IN	NS	f.edu-servers.net.
edu.			172800	IN	NS	g.edu-servers.net.
edu.			172800	IN	NS	l.edu-servers.net.
;; Received 260 bytes from 199.7.83.42#53(199.7.83.42) in 223 ms

mit.edu.		172800	IN	NS	usw2.akam.net.
mit.edu.		172800	IN	NS	asia1.akam.net.
mit.edu.		172800	IN	NS	asia2.akam.net.
mit.edu.		172800	IN	NS	use2.akam.net.
mit.edu.		172800	IN	NS	ns1-37.akam.net.
mit.edu.		172800	IN	NS	ns1-173.akam.net.
mit.edu.		172800	IN	NS	eur5.akam.net.
mit.edu.		172800	IN	NS	use5.akam.net.
;; Received 404 bytes from 192.31.80.30#53(192.31.80.30) in 548 ms

mit.edu.		20	IN	A	23.46.134.151
;; Received 41 bytes from 63.150.131.81#53(63.150.131.81) in 4 ms
Jan 172012
 

How to perform a reverse DNS lookup in Linux

Answer:

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

# dig -x 8.8.8.8

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

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

;; ANSWER SECTION:
8.8.8.8.in-addr.arpa.   86328   IN      PTR     google-public-dns-a.google.com.

..
Nov 302010
 

Show the Domain Name Servers for a domain

Answer:

To show the Domain Name Servers for a domain, use the command below:

E.g. example.com

# nslookup -type=ns example.com
Server:         203.98.160.11
Address:        203.98.160.11#53

Non-authoritative answer:
example.com     nameserver = b.iana-servers.net.
example.com     nameserver = a.iana-servers.net.

Authoritative answers can be found from:
a.iana-servers.net      internet address = 192.0.34.43
b.iana-servers.net      internet address = 193.0.0.236
b.iana-servers.net      has AAAA address 2001:610:240:2::c100:ec