DNStracer – Trace DNS queries to the source
Sponsored Link
Install DNStracer on ubuntu
Open the terminal and run the following command
sudo apt-get install dnstracer
Using DNStracer
Syntax
dnstracer [options] name
Available Options
-c -- Disable local caching.
-C -- Enable negative caching.
-o -- Enable overview of received answers at the end.
-q q>u>e>r>y>c>l>a>s>s> -- Change the query-class, default is A. You can either specify a number of the type (if you're brave) or one of the following
strings: a, aaaa, a6, soa, cname, hinfo, mx, ns, txt and ptr.
-r r>e>t>r>i>e>s> -- Number of retries for DNS requests, default 3.
-s s>e>r>v>e>r> -- DNS server to use for the initial request, default is aquired from the system. If a dot is specified (.), A.ROOT-SERVERS.NET will be used.
-v -- Be verbose on what sent or received.
-4 -- use only IPv4 servers, don't query IPv6 servers (only available when IPv6 support hasn't been disabled)
-S s>o>u>r>c>e>a>d>d>r>e>s>s> -- Use this as source-address for the outgoing packets.
DNStracer Examples
Search for the A record of www.ubuntugeek.com on your local nameserver
dnstracer www.ubuntugeek.com
Search for PTR record of x.x.x.x
dnstracer "-q" ptr x.x.x.x.in-addr.arpa