Date created: 06/24/19 09:12:44. Last modified: 07/05/19 18:16:41

'dig' - Notes

Install:

sudo yum install bind-utils
sudo apt-get install dnsutil

 

Query for a specific record type or types:

dig bbc.co.uk A
dig bbc.co.uk AAAA
dig bbc.co.uk MX
dig bbc.co.uk NS
dig bbc.co.uk TXT
dig bbc.co.uk A AAAA MX NS TXT # Multiple types works on Linux but not on Mac

 

Query for all record types:

dig bbc.co.uk all

 

Suppress all output with +noall and then enable only the query response output with +answer, dig defaults to A record type queries:

dig bbc.co.uk +noall +answer
dig bbc.co.uk +noall +answer MX

 

Only print the record value each record returned:

dig bbc.co.uk +short AAAA
dig +short -x 1.1.1.1

 

Trace the DNS query from the DNS root servers down:

dig -x 8.8.8.8 +trace

 

Perform a reverse DNS lookup:

dig -x 8.8.8.8 +short

 

Query against a specific DNS server:

dig @1.1.1.1 bbc.co.uk

 


Previous page: CIFS/SMB Notes
Next page: 'iperf' Notes