All systems come with default tools and applications that can help you to fix local issues. And in particular what we call DNS tools are specific DNS utilities that can help you to troubleshoot dns issues and website resolution errors.
List of Best DNS Tools for Windows, Linux and Mac
All operating systems in the world come with a default group of networking tools, that also include DNS tools, which can be used to detect and help you to fix dns errors.
This DNS tools are useful to investigate and analyse DNS records, and how these respond against common dns queries.
DNS lookups against DNS servers can help you to get valuable information about dns server setup, dns zones and general dns record health.
Flushing the DNS, while it is not a dns tool itself, sometimes can also help to fix dns resolution issues, if you want to know how to flush DNS on your operating system, check out this article: Flush DNS Cache.
Let's move on with the most useful and popular DNS utilities for Mac OS, Linux / Unix and Windows operating systems.
Table of Contents
DNS Lookup Tool
The dns lookup is one of the best things you can do to troubleshoot dns records and servers, and we will point this as your #1 dns tip.
A DNS lookup can give you a full report of your DNS zones, TLD server, Nameservers and dns records for some specific remote queries.
Let's see how to run a dns lookup on the all major operating systems:
nslookup is one of your best friends, you just don't know it.
nslookup command syntax
nslookup is a dns tool that is present on all operating systems, and the usage syntax is pretty simple:
As you see on this example:
[[email protected] ~]$ nslookup dnspropagation.net Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: dnspropagation.net Address: 22.214.171.124
On windows can be run from your MS-DOS command line, or from the powershell of latest Windows versions.
On Linux and Unix systems like Mac OS the syntax is the same.
From the command line or shell terminal, you can run the nslookup command as you saw before, or you can pass many other nslookup parameters like this:
querytype=value type=value Change the type of the information query. (Default = A; abbreviations = q, ty) [no]recurse Tell the name server to query other servers if it does not have the information. (Default = recurse; abbreviation = [no]rec) retry=number Set the number of retries to number. timeout=number
Change the initial timeout interval for waiting for a reply to number seconds.
While the most common usage of nslookup is just a simple lookup passing the hostname or domain name, it has many other options as you saw before.
Windows DNS Tools
This are the windows dns tools most used by system administrators and network managers:
Nslookup: as we said before, it is the bsic dns tool to perform query testing of the DNS domains & hostnames.
Ipconfig: this is another dns utility that can help you sometimes. ipconfig is used to display and modify IP configuration settings used by your local, like refreshing DHCP configuratin and DNS (Domain Name System) settings.
There are a few options that can help you if you are having dns issues:
- /flushdns: this parameter is used to reset / clear the records of the dns client resolver cache, useful to resolve negative caching records on your local dns cache.
- /displaydns: shows your dns client resolver cache content including hosts file entries, as well as the most recently dns queries resolved by your local operating system.
- /registerdns: this useful option used to start dynamic registrarion of DNS domain names and IP addresses previously set on your server or local computer. Usage of this parameter is extremely good to resolve dns registration issues.
Dnscmd: is another network tool based on the command line to manage dns servers. dnscmd program is used inside system batch scripts in order to better manage all the dns configurations over the windows server.
Linux DNS Tools
dig command is one of the most useful dns utilities you will ever use, it's a fast tool for querying dns servers when you are looking for Address records, NameServer records, MX records (mail exchanger) and other types of dns records like SPF, DKIM, etc.
dig tool is available for Linux and Unix systems (including MacOS) . The most common usage of dig command on Linux is against a single host, for example to query local dns resolve response after dns propagation, as you see below
Example of dns query using dig command:
[[email protected] ~]$ dig NS dnspropagation.net ; <<>> DiG 9.11.1-P2-RedHat-9.11.1-2.P2.fc26 <<>> NS dnspropagation.net ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56121 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 5 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;dnspropagation.net. IN NS ;; ANSWER SECTION: dnspropagation.net. 78897 IN NS kay.ns.cloudflare.com. dnspropagation.net. 78897 IN NS duke.ns.cloudflare.com. ;; ADDITIONAL SECTION: kay.ns.cloudflare.com. 41948 IN A 126.96.36.199 kay.ns.cloudflare.com. 47729 IN AAAA 2400:cb00:2049:1::adf5:3a7d duke.ns.cloudflare.com. 61899 IN A 188.8.131.52 duke.ns.cloudflare.com. 71568 IN AAAA 2400:cb00:2049:1::adf5:3b6e ;; Query time: 90 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: mar sep 05 21:34:05 -03 2017 ;; MSG SIZE rcvd: 189
As you see on this example, dig was very useful to discover lot of information regarding the primary and secondary name servers used, as well as their main IP addresses.
If you want to use dig to know the IP of a certain IP the syntax would be the same:
dig A domain.com
[[email protected] ~]$ dig A dnspropagation.net ; <<>> DiG 9.11.1-P2-RedHat-9.11.1-2.P2.fc26 <<>> A dnspropagation.net ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7713 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 5 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;dnspropagation.net. IN A ;; ANSWER SECTION: dnspropagation.net. 300 IN A 184.108.40.206
On this last dig command example, we've found additional details like the IP address of the remote domain name.
whois command is the most used WHOIS directory service client available on Linux and Unix.
whois is a terminal based utility that is used to search the WHOIS database when someone needs to find out information regarding domain names like domain registrar, domain name owner and dns nameservers used on the domain registrar.
whois command example to find out DNS Name Servers
[[email protected] ~]$ whois arin.net | grep "Name Server" -i Name Server: NS2.ARIN.NET Name Server: U.ARIN.NET Name Server: NS1.ARIN.NET Name Server: NS3.ARIN.NET [[email protected] ~]$ whois cloudflare.com | grep "Name Server" -i Name Server: NS3.CLOUDFLARE.COM Name Server: NS5.CLOUDFLARE.COM Name Server: NS4.CLOUDFLARE.COM Name Server: NS6.CLOUDFLARE.COM Name Server: NS7.CLOUDFLARE.COM
A dns lookup & reverse lookup tool for Unix and Linux systems.
host command is one of the most widely used dns utilities to perform reverse lookups, as well as normal dns lookups by system administrators.
The most common usage of host command is to know the host assigned to an IP address, as well as the opposite, to know the reverse IP information from a host.
host command examples
host domain.com or host IP
Host command output example:
[[email protected] ~]$ host dnspropagation.net dnspropagation.net has address 220.127.116.11 dnspropagation.net mail is handled by 0 mail.dnspropagation.net. [[email protected] ~]$ host 18.104.22.168 22.214.171.124.in-addr.arpa domain name pointer dnspropagation.net.
On this output you can see how the host dns tool is used to discover reverse dns (rDNS) assigned to the IP address, as well as the hostname IP response.
ping command is used to send ICMP ECHO_REQUEST to remote hosts across the network.
ping command is one of the top most used network commands by network administrators. ping utility is based on the ICMP ECHO_REQUEST datagram to answer against ICMP queries from remote hosts.
Ping examples to find our DNS records:
Ping command output example:
[[email protected] ~]$ ping dnspropagation.net PING dnspropagation.net (126.96.36.199) 56(84) bytes of data. --- dnspropagation.net ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms
While the ICMP response is closed on this server, we were able to use ping to determine the IP address of a domain name. Along with pinging domain names, ping command is also used to check network availablility and also to measure network response times.
Mac OS X DNS Tools
All the most common Linux DNS and Network Tools (dig, whois, nslookup, host, ping) commands also work in the same way for Mac OS operating system.
However, Mac OS includes a very complete network utility software suite that can help you to troubleshoot any DNS and network issues using their friendly GUI:
Apple's Network and DNS Utility Suite includes this tools:
- Netstat: very useful tool to scan the current packet traffic over the network, it also gives you information of packet type and network protocols used by each packet.
- DNS Lookup: used to print information fromt he DNS servers, pretty similar to dig and nslookup commands described before.
- Traceroute: traces the path / route of network connections as it moves across world wide or local networks.
- Whois: querys the whois database when a domain name is specified.
- Finger: displays information for the specified system users.
- Port Scan: remote open port scanner for internet hosts and IP addresses.
Apple network utility can be found at the following locations, depending on your Mac OS version:
- OS X Mavericks: /System/Library/CoreServices/Applications.
- OS X Mountain Lion & Snow Leopard: Applications / Utilities folder.
Other Online DNS Tools
There are many other tools to mention, if you don't want to go into the terminal of your Mac or Linux systems, you can always try the following online dns tools: