Difference between revisions of "Dig"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | https://www.rootusers.com/12-dig-command-examples-to-query-dns-in-linux/ | ||
+ | |||
# Simple Commands | # Simple Commands | ||
+ | |||
+ | # Get Authoritative DNS servers | ||
+ | ``` | ||
+ | dig +short NS example.com. @8.8.8.8 | ||
+ | ``` | ||
+ | |||
+ | PTR/Reverse DNS Record | ||
+ | ``` | ||
+ | dig -x $ip +short | ||
+ | ``` | ||
+ | |||
+ | Multiline | ||
+ | ``` | ||
+ | for i in $(cat dev.uniq); do echo $i; dig +noall +answer +multiline $i; done | ||
+ | ``` | ||
+ | |||
``` | ``` | ||
dig +short google.com TXT @8.8.8.8 # test recursion | dig +short google.com TXT @8.8.8.8 # test recursion | ||
Line 7: | Line 25: | ||
dig foo.example.com +nssearch | dig foo.example.com +nssearch | ||
dig foo.example.com +all | dig foo.example.com +all | ||
+ | ``` | ||
+ | |||
+ | ``` | ||
+ | dig +short @8.8.8.8 -p 5300 google.com | ||
+ | ``` | ||
+ | |||
+ | ``` | ||
+ | dig +noall +answer +multiline google.com any | ||
+ | dig SOA +multiline google.com | ||
``` | ``` |
Latest revision as of 17:04, 6 March 2024
https://www.rootusers.com/12-dig-command-examples-to-query-dns-in-linux/
Simple Commands
Get Authoritative DNS servers
dig +short NS example.com. @8.8.8.8
PTR/Reverse DNS Record
dig -x $ip +short
Multiline
for i in $(cat dev.uniq); do echo $i; dig +noall +answer +multiline $i; done
dig +short google.com TXT @8.8.8.8 # test recursion
dig foo.example.com +nssearch dig foo.example.com +all
dig +short @8.8.8.8 -p 5300 google.com
dig +noall +answer +multiline google.com any dig SOA +multiline google.com