Nslookup command and 10 easy examples

04.08.2020 37,667 3

Nslookup command explained

There is plenty of command-line interface software for network diagnostics out there. One of the commonly used is nslookup. Why? Because it is simple, yet useful. It has a set of functions for checking different DNS records and DNS servers.

You can find it on various OSes like Windows, of course, but also many Linux distros, some Unix-based OSes (macOS), and ReactOS.

Network administrators can use it simultaneously with other software and receive diverse network data.

There are also websites that provide many online diagnostics tools like nslookup online. They could be useful because you don’t depend on the OS of your device, but bear in mind you should use just well-recognized sites for better security.

How to open nslookup?

To open nslookup on Windows 10:

You need to run the command prompt. Go to Start, then Run, type in “cmd” and press enter. In the Command prompt write nslookup and click Enter. Ready!

*Nslookup works differently on different OSes. We recommend that you use it on Linux or macOS for full functionality.

To open nslookup on Linux:

Start the Terminal and type in “nslookup”. Then press Enter and you are all set!

To open nslookup on macOS:

Go to applications and search for the Terminal. Open it and write “nslookup” followed by a press of the Enter button. Done!

Nslookup commands, examples

We are using Google.com for our examples, but you can change it with the domain you’d like to check out.

Search for the A records of а particular domain

Use nslookup to create a query for the A records of a domain. That way you can see all the IP addresses related to the domain.

nslookup google.com

Check the NS records of a specific domain

By executing this command, you will see the authoritative server for the selected domain. It is written on the NS records

nslookup -type=ns google.com

Check the SOA record

SOA is the start of authority. In the SOA record you can get the zone information.

nslookup -type=soa google.com

Nslookup for MX records

You can use nslookup to check the MX records and verify if the mail servers are working properly.

nslookup -query=mx google.com

Look at all the DNS records of a domain

You want to see all the DNS records, use this command. Later you can check any of the available DNS records, one by one if you like.

nslookup -type=any google.com

Check a specific ns server for the selected domain

You can also use this admin tool to check a specific ns server. You can see if it is responsive or not.

nslookup example.com ns1.google.com

Reverse DNS Lookup with nslookup

Sometimes you don’t need the IP address of a domain, but you want to see if an IP really corresponds to a specific domain. Then you use a reverse DNS lookup with the IP address in question.

nslookup 10.20.30.40

A specific port in use

See if a particular port is in use. Maybe you want to verify that you’ve limited a certain port. An nslookup for that port should do the trick. In our case, it will be port 53.

nslookup -port=53 example.com

Timeout of the query

You can change the time interval to more seconds if you want to give more time to the server. Also, you can limit the time to see which servers respond fast enough. In our example, it is 15 seconds.

nslookup -timeout=15 google.com

Debug mode enable

You can enable the Debug mode which will give you detailed information about the question and the received answer.

nslookup -debug google.com

So, nslookup is a small tool, a command-line that you can use for different purposes. You can see a lot of information about DNS records of your domain.

3 replies on “Nslookup command and 10 easy examples”

Bauc144

… [Trackback]

[…] Here you can find 63099 additional Information to that Topic: blog.neterra.cloud/en/nslookup-command-and-10-easy-examples/ […]

Buy Geek Vapes Online

… [Trackback]

[…] Read More here to that Topic: blog.neterra.cloud/en/nslookup-command-and-10-easy-examples/ […]

niches for youtube automation

… [Trackback]

[…] Find More here to that Topic: blog.neterra.cloud/en/nslookup-command-and-10-easy-examples/ […]

Leave a Reply

Your email address will not be published.