Tools & Utility
Dig
The Domain Information Groper (dig) is one of the most powerful command-line tools for querying DNS records.
#dns#dig#enumeration#networking
Dig: DNS Querying and Enumeration
dig (Domain Information Groper) is one of the most powerful and widely used command-line tools for querying DNS records.
Why Use dig?
- 🔍 Retrieve DNS Records – A, AAAA, MX, NS, TXT, CNAME, and more
- 🔍 Perform Reverse Lookups
- 🔍 Query Specific Name Servers
- 🔍 Check DNS Propagation
- 🔍 Troubleshoot DNS Issues
Installation
bash
# Debian/Ubuntu
sudo apt install dnsutils
Red Hat/CentOS
sudo yum install bind-utils
macOS
brew install bindBasic Usage
bash
# Query A Record
dig example.com
Query MX Records
dig example.com MX
Query Name Servers
dig example.com NS
Reverse DNS Lookup
dig -x 93.184.216.34
Query Specific Name Server
dig @8.8.8.8 example.com A
Zone Transfer
dig @ns1.example.com example.com AXFRAutomation
bash
# Batch Resolve
for domain in example.com test.com site.com; do
dig $domain A +short
done
Find Subdomains
for sub in www mail ftp dev; do
dig "$sub.example.com" A +short
done