Friday, November 13, 2015

Dig Commands

Look up A record as seen by nameserver
dig @

Show the MX record for a yahoo domain
dig MX

Show the TTL for a given domain
dig TTL

Show the TXT record for an yahoo domain
dig TXT

Show only the answer
dig +nocomments +noquestion +noauthority +noadditional +nostats

All Records
dig @ ANY +noall +answer

Reverse Lookup
dig -x

Nice output that looks like the domain record
dig any +multiline +noall +answer

Find the authoritative nameserver for a domain:
dig -t ns +short

Find the SOA of the domain:
dig soa +noall +answer

Download a zone file (zone transfer):
dig axfr

Common Options:
  +short  = show only the results
  +[no]comments = show/hide the comments
  +[no]question = show/hide the question section
  +[no]authority = show/hide the authority section
  +[no]stats = show/hide the stats section
  +[no]answer = show/hide the answer section
  +[no]all = show/hide everything

Nice article:

No comments: