Most used Nslookup commands
Nslookup syntax
How to find the A record of а domain.
You can use this command to see how many A records are there and see the IP Addresses of each one.
Command line:
$ nslookup b1s.eu
How to check the NS records of a domain.
By checking the NS records, you can see which is the authoritative server for a specific domain.
Command line:
$nslookup -type=ns b1s.eu
How to query the SOA record of a domain.
With this one, you can see the start of authority and get information about the zone.
Command line:
$nslookup -type=soa b1s.eu
How to find the MX records responsible for the email exchange.
Here we are checking the MX records of the mail servers. You can see if all the mail servers are working well.
Command line:
$ nslookup -query=mx b1s.eu
How to find all of the available DNS records of a domain.
This lookup has a large scope. Here we want to see all the available DNS records. After seeing all of them, we can do specific lookups for different types of DNS records.
Command line:
$ nslookup -type=any b1s.eu
How to check the using of a specific DNS Server.
Apart from checking DNS records, you can use the Nslookup to review a particular DNS server and how it works. You can check if it is active or if it responds on time.
Command line:
$ nslookup example.com ns1.b1s.eu
How to check the Reverse DNS Lookup.
Many times you check the A records to see the IPs of a domain, but sometimes you need to verify if an IP address is related to a specific domain. For that purpose, we need a reverse DNS lookup.
Command line:
$ nslookup 8.8.8.8
How to check for a PTR record?
You can verify if an IP address belongs to a domain name by performing a reverse DNS query. For this purpose, you will need to check the PTR record that links an IP address to a domain name. You will need to put the IP address in reverse (192.168.1.25 changes to 25.1.168.192), and you need to add in-addr.arpa because it is stored in arpa’s top-level-domain.
Command line:
$ nslookup -type=ptr 25.1.168.192.in-addr.arpa
How to change the timeout interval for a reply.
You can manually choose the timeout time in seconds. You can increase it to give more time for the server to respond. You can also shorter it to see which servers can respond quicker.
Command line:
$ nslookup -timeout=20 b1s.eu
How to enable debug mode.
Debug mode provides important and detailed information both for the question and for the received answer.
Command line:
$ nslookup -debug b1s.eu