dig Options
There are too many dig command-line options to show here, so look at dig’s manual page for an exhaustive list. Here’s a list of the most important ones, though, and what they do:
- -x address
nslookup is smart enough to recognize an IP address and look up the appropriate domain name in in-addr.arpa, so why not dig? If you use the -x option, dig assumes that the domain name argument you’ve specified is really an IP address, so it inverts the octets and tacks on in-addr.arpa. Using -x also changes the default record type looked up to ANY, so you can reverse map an IP address with dig -x 10.0.0.1.
- -p port
Send queries to the specified port instead of port 53, the default.
- +norec[urse]
Turn off recursion (recursion is on by default).
- +vc
Send TCP-based queries (queries are UDP by default).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access