DNS zone transfers can reveal a domain’s full set of records when a server allows AXFR or IXFR requests. Learn how the dig command sends an AXFR query on Linux, what returned records can show, and why a REFUSED response matters for DNS security.

Multiple Choice

Which DNS tool can perform zone transfers on modern Linux distributions?

Zone transfers pull an entire DNS zone from a server using AXFR (or IXFR). On modern Linux systems, DIG is the most straightforward tool for this because it directly supports AXFR queries. You’d use a command like dig @nameserver example.com AXFR to request the zone from that server. If the server permits transfers, you’ll see the full set of zone records; if not, you’ll get an access error such as REFUSED. While other utilities like NSLOOKUP or HOST can sometimes perform zone transfers in certain setups, their support is less consistent across current distributions, and BIND itself is the DNS server software rather than a client tool. DIG’s reliable AXFR capability makes it the best choice for zone transfer testing on modern Linux.

DNS Zone Transfers: What dig Reveals About a Domain

A DNS zone transfer can turn a quiet-looking domain into a surprisingly detailed map. Instead of asking for one record at a time, a client requests a copy of the zone’s records from a DNS server. When the server allows that request, the response may reveal hostnames, mail servers, name servers, and other details that help explain how a domain is arranged. On modern Linux systems, dig is a straightforward tool for making that request.

Zone transfers have a legitimate job: they help keep multiple DNS servers in sync. But they also matter in security work. If a server shares a full zone with anyone who asks, an outsider might learn more about the organization’s public-facing systems than its administrators intended.

First, what’s a DNS zone?

The Domain Name System, or DNS, translates names such as example.com into information computers can use. That information is stored in records. An A record can connect a hostname to an IPv4 address; an MX record identifies mail servers; an NS record lists authoritative name servers.

A DNS zone is a managed portion of the DNS namespace. It might contain records for a domain and its subdomains, depending on how the domain is set up. Think of it as a directory of names and services, maintained by an authoritative DNS server.

Most DNS lookups are narrow. A client asks for one piece of information, such as the address for www.example.com, and the server returns that record. A zone transfer is different. It asks the server to send records for a much broader area, potentially the entire zone.

AXFR and IXFR, in plain language

AXFR is the traditional DNS zone-transfer method. The name refers to a full transfer: the requesting client asks for the zone, and the server sends its records. Because the response may be large, AXFR uses TCP rather than relying on the small, quick exchange common with many ordinary DNS queries.

IXFR, or incremental zone transfer, is designed to send only changes since a known version of the zone. That can save time and network traffic when secondary DNS servers need updates. The two methods serve the same general purpose—keeping DNS data consistent—but handle the amount of transferred data differently.

A transfer should normally be limited to approved secondary servers. If a DNS server accepts AXFR requests from any source, it may disclose a useful inventory of names and services. That doesn’t automatically mean the systems are vulnerable, but it can make reconnaissance easier. A list of hostnames can provide clues about remote access systems, development environments, mail infrastructure, or services that aren’t obvious from the main website.

Why dig is the usual Linux choice

dig is a command-line DNS lookup utility commonly included in DNS tool packages on Linux. Depending on the distribution, it may come with a package named dnsutils or bind-utils. The name can cause a little confusion: dig is a client utility, while BIND is DNS server software that also includes several DNS tools.

To request an AXFR transfer, the basic command is:


dig @nameserver example.com AXFR

Replace nameserver with the DNS server’s hostname or IP address, and replace example.com with the zone you’re checking. The @ tells dig which server to query. Without it, the system may send the request to a resolver configured on the local machine, which might not be the authoritative server you meant to contact.

For example:


dig @ns1.example.com example.com AXFR

The command asks ns1.example.com for a full transfer of the example.com zone. If the server permits the request, dig prints the records it receives. The output can be lengthy, so it helps to read it as structured DNS data rather than as a block of mysterious text. Each record has a name, a time-to-live value, a class, a type, and record-specific data.

Some transfers return a status message such as REFUSED. That usually means the server understood the request but declined to provide the zone. A timeout or connection failure points to a different problem: the server may be unreachable, the query may be blocked, or the requested server may not support the transfer for that zone.

Reading the result without jumping to conclusions

A successful transfer can expose a lot, but context matters. A hostname like vpn.example.com suggests a remote-access service; it doesn’t prove that the service is reachable or insecure. A record for a development system may be old, private, or otherwise irrelevant from an external network. DNS is a map, not a full inventory of what is live.

It’s also worth checking which server answered. A domain can use several authoritative name servers, and their settings may differ. One server might refuse AXFR while another is misconfigured. When assessing a domain with authorization, comparing its authoritative servers can help identify inconsistent transfer controls.

dig can also request IXFR data, though the exact result depends on the server and the zone’s update history. In ordinary security reviews, AXFR is often the clearest first check because it asks for a full zone transfer and produces output that’s easy to inspect.

What about nslookup and host?

Linux DNS utilities vary by distribution and version. nslookup and host are useful for many routine DNS queries, and some versions or configurations can handle zone-transfer requests. Their behavior, however, is less consistent across current systems and implementations.

dig is widely used for detailed DNS troubleshooting and provides direct support for AXFR-style requests. Its syntax also makes the requested server and record type explicit. That clarity is helpful when you’re documenting a finding or checking several authoritative servers.

BIND deserves a brief mention because it’s closely connected to the subject. BIND is a DNS server implementation, not simply another lookup command. It includes tools such as dig, but saying “use BIND” for a transfer request blurs the difference between the server software and the client utility that sends the query.

A useful check—and a reminder about permission

A zone-transfer request is a normal DNS operation, but that doesn’t mean every target is yours to query. Security assessments should stay within clear authorization and scope. A small, targeted request to an approved server is different from probing unrelated infrastructure.

For administrators, the lesson is simple: allow transfers only to approved secondary DNS servers, and review access controls whenever DNS infrastructure changes. A configuration that worked for years can become exposed after a migration, a provider change, or a forgotten firewall rule. Periodic checks help catch those quiet mistakes.

For security analysts, dig offers a clean way to see whether a server will provide a zone and what it reveals if it does. The command is short; interpreting the result takes more care. That balance is typical of DNS work: the request itself may be simple, while the meaning of the records depends on the system around them.

A zone transfer exists to keep DNS dependable, not to publish an organization’s entire internal blueprint. Used thoughtfully, dig helps both operators and authorized reviewers understand whether a server is sharing the right information with the right systems.