dig
Zone Transfers with the dig
Command on Linux
dig
Command on LinuxZone transfers are typically the result of DNS server misconfigurations. There are several tools available to perform zone transfers, and in this guide, we will focus on using the dig
and host
commands in Linux.
Using the dig
Command
dig
CommandThe dig
command is a powerful tool for DNS querying in Linux. Below, we will look at how to perform various DNS queries and zone transfers using the dig
command:
General DNS Queries
Standard Query
dig target.com
Short Format Query
dig target.com +short
PTR Record Query
dig target.com PTR
MX Record Query
dig target.com MX
NS Record Query
dig target.com NS
Zone Transfer Queries
Zone transfers, especially on misconfigured DNS servers, can be performed using the following techniques:
Standard Zone Transfer
dig [email protected] target.com
Zone Transfer with Specific Options
dig domain.com AXFR +noall +answer # or dig +nocmd domain.com AXFR +noall +answer @domain.com
Zone Transfer on a Specified DNS Server
dig @10.50.96.5 foocampus.com -t AXFR+nocookie
Last updated
Was this helpful?