dnstracer
dnstracer traces DNS queries to determine where a given Domain Name Server gets its information for a hostname, following the chain of DNS servers back to the authoritative answer.
Description
dnstracer is a tool designed to trace the path of DNS queries from a specified server back to the source of the authoritative answer for a given hostname. It reveals the delegation chain in the DNS hierarchy, helping users understand how DNS resolution occurs across different servers.
Use cases include debugging DNS resolution issues, mapping DNS infrastructure, and investigating potential DNS misconfigurations or hijacking. Network administrators and security researchers can use it to verify the integrity of DNS responses and identify upstream servers involved in name resolution.
The tool supports various query types and customization options for retries, timeouts, and caching behaviors, making it versatile for detailed DNS analysis.
How It Works
dnstracer sends DNS queries starting from an initial server (default localhost or specified) and follows referrals to parent DNS servers until reaching the authoritative server for the queried hostname. It handles retries, timeouts, and caching as configured, parsing DNS headers and IP details in responses. The tool supports A record queries by default but can specify other query types, source addresses, and IPv4-only mode, displaying verbose packet information and server chains.
Installation
sudo apt install dnstracerFlags
Examples
dnstracer -r 3 -v example.comdnstracer example.comdnstracer -s 8.8.8.8 example.comdnstracer -q MX example.comdnstracer -c -v example.comdnstracer -s . example.comdnstracer -4 -r 5 example.com