network dig - ghdrako/doc_snipets GitHub Wiki
https://www.cyberciti.biz/faq/linux-unix-dig-command-examples-usage-syntax/
dig <url> | grep IN A
Basic syntax
dig Hostname
dig DomaiNameHere
dig @DNS-server-name Hostname
dig @DNS-server-name IPAddress
dig @DNS-server-name Hostname|IPAddress type
Type | Purpose | Examples |
---|---|---|
A | IPv4 IP address | 192.168.1.5 or 75.126.153.206 |
AAAA | IPv6 IP address | 2607:f0d0:1002:51::4 |
CNAME | Canonical name record (Alias) | s0.blaataap.com is an alias is an alias for nothing |
MX | Email server host names | smtp.blaataap.com or mx1.blaataap.com |
NS | Name (DNS) server names | ns1.blaataap.com |
PTR | Pointer to a canonical name. Mostly used for implementing reverse DNS lookups | 8.8.8.8.in-addr.arpa |
SOA | Authoritative information about a DNS zone | see below |
TXT | Text record | see below |
query a different nameserver
dig @DNS-server-name Hostname
dig @DNS-server-name IPAddress
select the DNS query type
dig Hostname|IPAddress type
dig @ns-server-here Hostname|IPAddress type
dig Hostname|IPAddress type
dig [+options] @ns-server-here Hostname|IPAddress type
FIND THE IP ADDRESS (A) OF A HOSTNAME
dig blaataap.com
dig @dns.google.com blaataap.com
dig +short blaataap.com A
Set IPv4 or IPv6 query transport mode
dig -4 query ...
dig -6 query ...
Specify port number for dns query
dig -p {PORT} query
dig -p 53 @1.1.1.1 blaataap.com