Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dig [2015/11/24 13:56]
steve
dig [2017/07/05 19:42]
steve
Line 4: Line 4:
  
   * [[http://​alvinalexander.com/​linux-unix/​dig-commands-examples-tcp-ip-mx-record-dns|dig commands and examples]]   * [[http://​alvinalexander.com/​linux-unix/​dig-commands-examples-tcp-ip-mx-record-dns|dig commands and examples]]
 +
 +== Set defaults ==
 +
 +You can use ''​.digrc''​ and store the same command line options in there to use as defaults.
 +
 +Here, query Google'​s DNS server for lookups:
 +
 +<​code>​
 +@8.8.8.8
 +</​code>​
 +
 +Enable short output for all commands:
 +
 +<​code>​
 ++short
 +</​code>​
  
 == Lookup DNS records using nameservers == == Lookup DNS records using nameservers ==
Line 19: Line 35:
 dig mx example.com dig mx example.com
 </​code>​ </​code>​
 +
 +See also [[dnsmx]], which provides less verbosity.
  
 == Find the TXT records == == Find the TXT records ==
  
-Can be used to display SPF entries. See also [[dnstxt]].+Can be used to display SPF entries.
  
 <​code>​ <​code>​
 dig txt example.com dig txt example.com
 </​code>​ </​code>​
 +
 +See also [[dnstxt]].
  
 == Check if DNS records match == == Check if DNS records match ==
Line 56: Line 76:
 <​code>​ <​code>​
 dig ANY +noall +answer domain.com dig ANY +noall +answer domain.com
 +</​code>​
 +
 +== Reverse DNS lookups ==
 +
 +<​code>​
 +dig -x 208.111.40.179
 </​code>​ </​code>​