dnsdiag: DNS Diagnostics and Performance Measurement Tools
DNS Diagnostics and Performance Measurement Tools
Ever been wondering if your ISP is hijacking your DNS traffic? Ever observed any misbehavior with your DNS responses? Ever been redirected to wrong address and suspected something is wrong with your DNS? Here we have a set of tools to perform basic audits on your DNS requests and responses to make sure your DNS is working as you expect.
You can measure the response time of any given DNS server for arbitrary requests using dnsping
. Just like traditional ping utility, it gives you similar functionality for DNS requests.
You can also trace the path your DNS request takes to destination to make sure it is not being redirected or hijacked. This can be done by comparing different DNS queries being sent to the same DNS server using dnstraceroute
and observe if there is any difference between the path.
dnseval
evaluates multiple DNS resolvers and helps you choose the best DNS server for your network. While it is highly recommended using your own DNS resolver and never trust any third-party DNS server, but in case you need to choose the best DNS forwarder for your network, dnseval
lets you compare different DNS servers from performance (latency) and reliability (loss) point of view.
Installation
From source code
git clone https://github.com/farrokhi/dnsdiag.git
cd dnsdiag
pip3 install -r requirements.txt
using pip
pip3 install dnsdiag
From Binary
https://github.com/farrokhi/dnsdiag/releases
Usage
dnsping
dnsping pings a DNS resolver by sending an arbitrary DNS query for given number of times:
This script calculates minimum, maximum and average response time as well as jitter (stddev)
dnstraceroute
dnstraceroute is a traceroute utility to figure out the path that your DNS request is passing through to get to its destination. You may want to compare it to your actual network traceroute and make sure your DNS traffic is not routed to any unwanted path.
Using --expert
will instruct dnstraceroute to print expert hints (such as warnings of possible DNS traffic hijacking).
dnseval
dnseval is a bulk ping utility that sends an arbitrary DNS query to a give list of DNS servers. This script is meant for comparing response time of multiple DNS servers at once:
Copyright (c) 2016, Babak Farrokhi
All rights reserved.
Source: https://github.com/farrokhi/