dnsdiag v2.0.1 releases: 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 the 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 to use 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.
- Add support for DNSSEC
- Add -F to display flags for each response (dnsping)
- Display full response in verbose mode (dnsping)
- Add DoT (DNS over TLS) support (dnsping, dnseval)
- Add DoH (DNS over HTTPS) support (dnsping, dnseval)
- Add TCP support
- Improved JSON output support for dnseval
- Refactor and PEP8 cleanup
- Do not use system resolver when not needed
- Add support for user defined source IP address
- Add user-specified destination port (-p/–port)
- Improve error handling
- Display last response code for each entry
- Rework custom socket and custom TTL support
- Rework time calculation logic to eliminate an extra DNS request that was just sent for timing (dnstraceroute)
- Update docs (output samples, use cases, etc)
- Use proper terminology (in code) to reduce confusion
From source code
git clone https://github.com/farrokhi/dnsdiag.git
pip3 install -r requirements.txt
pip3 install dnsdiag
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 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.
--expert will instruct dnstraceroute to print expert hints (such as warnings of possible DNS traffic hijacking).
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.