dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried.

dig is included in the debian dnsutils package.

Check which nameservers are reported by dns:

dig domain.tld ns

Check which mailservers are reported by dns:

dig domain.tld mx

Verify your txt entries for spf (Sender Policy Framework) is set correctly:

dig txt example.com

Find out the SOA (Start Of Authority) record:

dig SOA example.com

Check a specific DNS-Server:

 @server.tld domain.tld mx

Check all entries, including ipv6:

#1st check which nameservers are authorative:
dig ns google.com +short
#2nd pick one of these nameserver to query:
dig @ns1.google.com google.com any

Check version of Bind for given DNS-Server:

dig @ns.example.com -c CH -t txt version.bind

Extract a whole zone with a zone transfer (if allowed)

dig @ns.example.com example.com -t AXFR


# forward lookup
dig AAAA ipv6.example.com
dig AAAA ipv6.example.com +short

# reverse lookup
dig -x 2a00:1450:4005:808::101f
linux/dig.txt · Last modified: 2016-10 by tb
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready