Basic usage of CentOS command, dig
, provided by package bind-utils
Find A record of a domain name with current DNS set
1
dig example.com
Find A record of a domain name with specified DNS, 1.1.1.1
1
dig example.com @1.1.1.1
Show terse result
1
dig example.com @1.1.1.1 +short
Show trace from root domain to destinated domain name
1
dig example.com @1.1.1.1 +trace
Reverse lookup and IP address, pay attention, it is -
sign, not +
1
dig -x 1.2.3.4