NSLookup & Dig

NSLookup

NSLookup provides basic lookup about a domain name.

kali@kali:~$ nslookup google.com
Server:      192.168.0.1
Address:     192.168.0.1#53

Non-authoritative answer:
Name:    google.com
Address: 172.217.166.110
Name:    google.com
Address: 2404:6700:4007:811::200e

kali@kali:~$

Like the host command, you can pass flags to query specific information such as the MX records of a domain.

kali@kali:~$ nslookup -query=mx google.com
Server:      192.168.0.1
Address:     192.168.0.1#53

Non-authoritative answer:
google.com mail is handled by 20 alt1.aspmx.l.google.com
google.com mail is handled by 10 aspmx.l.google.com
google.com mail is handled by 30 alt2.aspmx.google.com

kali@kali:~$

DIG

Dig is an additional information look-up tool with a ton of extensive commands for query specific info.

kali@kali:~$ dig google.com
kali@kali:~$ dig +cmd +a google.com

Last updated