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:// | ||
| + | |||
| + | == Set defaults == | ||
| + | |||
| + | You can use '' | ||
| + | |||
| + | Here, query Google' | ||
| + | |||
| + | < | ||
| + | @8.8.8.8 | ||
| + | </ | ||
| + | |||
| + | Enable short output for all commands: | ||
| + | |||
| + | < | ||
| + | +short | ||
| + | </ | ||
| + | |||
| + | == Lookup DNS records using nameservers == | ||
| + | |||
| + | You should see similar results for a DNS lookup, using the different nameservers. | ||
| + | |||
| + | < | ||
| + | dig site.example.com @ns1.example.com | ||
| + | dig site.example.com @ns2.example.com | ||
| + | </ | ||
| + | |||
| + | == Find the MX mail records == | ||
| + | |||
| + | < | ||
| + | dig mx example.com | ||
| + | </ | ||
| + | |||
| + | See also [[dnsmx]], which provides less verbosity. | ||
| + | |||
| + | == Find the TXT records == | ||
| + | |||
| + | Can be used to display SPF entries. | ||
| + | |||
| + | < | ||
| + | dig txt example.com | ||
| + | </ | ||
| + | |||
| + | See also [[dnstxt]]. | ||
| + | |||
| + | == Check if DNS records match == | ||
| + | |||
| + | Look for the serial numbers: | ||
| + | |||
| + | < | ||
| + | dig soa example.com @ns1.example.com | ||
| + | dig soa example.com @ns2.example.com | ||
| + | </ | ||
| + | |||
| + | == Find the TTL for a domain == | ||
| + | |||
| + | < | ||
| + | dig +nocmd domain.com +noall +answer | ||
| + | domain.com. 86353 IN A 1.2.3.4 | ||
| + | </ | ||
| + | |||
| + | The first number is the TTL. You can divide it by 360 to see how many hours are left. | ||
| + | |||
| + | == Find all the records == | ||
| + | |||
| + | < | ||
| + | dig ANY domain.com | ||
| + | </ | ||
| + | |||
| + | == Minimize output == | ||
| + | |||
| + | < | ||
| + | dig ANY +noall +answer domain.com | ||
| + | </ | ||
| + | |||
| + | == Reverse DNS lookups == | ||
| + | |||
| + | < | ||
| + | dig -x 208.111.40.179 | ||
| + | </ | ||