no way to compare when less than two revisions

Differences

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


dig [2017/07/06 01:42] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== dig ======
  
 +  * [[DNS]]
 +
 +  * [[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 ==
 +
 +You should see similar results for a DNS lookup, using the different nameservers.
 +
 +<code>
 +dig site.example.com @ns1.example.com
 +dig site.example.com @ns2.example.com
 +</code>
 +
 +== Find the MX mail records ==
 +
 +<code>
 +dig mx example.com
 +</code>
 +
 +See also [[dnsmx]], which provides less verbosity.
 +
 +== Find the TXT records ==
 +
 +Can be used to display SPF entries.
 +
 +<code>
 +dig txt example.com
 +</code>
 +
 +See also [[dnstxt]].
 +
 +== Check if DNS records match ==
 +
 +Look for the serial numbers:
 +
 +<code>
 +dig soa example.com @ns1.example.com
 +dig soa example.com @ns2.example.com
 +</code>
 +
 +== Find the TTL for a domain ==
 +
 +<code>
 +dig +nocmd domain.com +noall +answer
 +domain.com. 86353 IN A 1.2.3.4
 +</code>
 +
 +The first number is the TTL.  You can divide it by 360 to see how many hours are left.
 +
 +== Find all the records ==
 +
 +<code>
 +dig ANY domain.com
 +</code>
 +
 +== Minimize output ==
 +
 +<code>
 +dig ANY +noall +answer domain.com
 +</code>
 +
 +== Reverse DNS lookups ==
 +
 +<code>
 +dig -x 208.111.40.179
 +</code>

Navigation
QR Code
QR Code dig (generated for current page)