5 most popular Nslookup commands

Nslookup is one very simple network tool, but with the big advantage that it comes pre-built on almost any OS, including different Linux distros, macOS, other Unix-based OSes, and Windows too.

You can use it for different network diagnostics and domain probing, but the 5 most popular nslookup commands are these:

1. Without extra options

nslookup google.com

The basic nslookup command. It will get as an answer the IPv4 and the IPv6 addresses of the domain that you probed. The answer part is shorter than other commands like host or dig. It will provide just a single IPv4 and a single IPv6 address. You won’t get any other information about the A or AAAA records like TTL values.

2. Nslooup + any type of DNS

nslookup -type=any google.com

Get all of the available DNS records with one shot.

Yes, you can perform the nslookup command with an option for a specific query and set it to any. That will ask the nameserver to return all possible DNS records that it has for the domain, including – A, AAAA, MX, NS, SOA, and TXT (like the SPF record). The query might take some extra time in comparison to a single DNS record type, so be patient. When the query got answered, you will see the content of all of the DNS records one after another. It is good to understand the whole picture, but you can perform a specific query later. After that, you can perform similar queries, changing the part “any” with a specific DNS record type like “mx”, “ns”, “soa”, and others. 

3. NSlookup + IP address


Reverse DNS lookup using the IP address. You can use the IPv4 or IPv6 address and perform a reverse nslookup command to see which is the host with that IP address. That way, you can validate that a particular service belongs to the domain that it is saying it belongs to. Backcheck is always better than no check.

4. Nslookup + timeout in seconds

nslookup -timeout=30 google.com

This nslookup command will specify a 30-second interval for waiting for a response. You can give more time to get an answer from a nameserver, especially if you know that the specific server is far away from your location. You can change the number to a smaller or larger value. In case that you have problems using that option, you must first flush the dns and restart your computer. After that, it should work without problems.

5. Nslookup command + port number

nslookup -port=43 google.com

In this case, we have specified that we want to use port number 43 for the specific query. You can check if you have correctly blocked a specific port and see if another that you have chosen works correctly. You can change the number with another and test.

You can change all the domain names with others or perform reverse DNS with another IP address (work both with IPv4 and IPv6 addresses). Fill free to copy and paste the commands and try them with your domain name or the domain names of your competitors.

Now you know what simple but effective domain probing tool you already have on your device. Go on, try it out. Use it through the Terminal on Linux and macOS or through the Command Prompt on Windows. See what it can do and integrate it into your regular website checks.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top