Skip to content

Zone transfer (AXFR) on cPanel — when to allow it, when to deny, how to debug

AXFR is how slaves pull zones from masters. By default cPanel keeps AXFR locked to the cluster. Here is when to open it, when to deny, and how to debug a failing transfer.

A team adds a new DNS slave to an existing cPanel cluster. The cluster trust is set up, the API works, but the new slave’s zones come up empty. dnsadmin log shows zones being pushed but the slave’s named doesn’t load them. The issue is AXFR (zone transfer) — cPanel uses HTTP-based cluster sync, but some configurations expect classical BIND AXFR over port 53/TCP, and the firewall between nodes was set up assuming HTTP.

What’s happening

Two distinct mechanisms can move a zone from master to slave:

  • cPanel’s cluster sync via dnsadmin — HTTP API calls between WHM nodes. Pushes zone content over port 2087. This is the default mechanism.
  • Classical BIND AXFR — a slave issues an AXFR query to the master over port 53/TCP. The master returns the full zone. Used by third-party slaves (a non-cPanel BIND or a hosted secondary DNS).

cPanel’s default named.conf allows AXFR only from listed cluster IPs (in /etc/named.conf under allow-transfer { ... }). Anyone else gets REFUSED. That’s the right default — public AXFR is a leak (anyone can enumerate every record in your zone) and is rarely needed.

But if you’re integrating with a third-party DNS provider that pulls via AXFR (some hosted secondary DNS services do), you have to allow AXFR from their IPs.

How to verify

Test AXFR from a specific source IP:

dig +short AXFR example.com @master.example.com
dig +short AXFR example.com @master.example.com -b 192.0.2.10

The first uses your default source; the second binds to a specific source. If the master allows AXFR from 192.0.2.10 but not from others, only the second will work.

Check the master’s allow-transfer config:

grep -A2 'allow-transfer' /etc/named.conf
grep -A2 'allow-transfer' /var/named/example.com.db.conf

Check the slave’s log for refused-transfer errors:

tail -200 /var/log/messages | grep -i 'transfer.*refused\|axfr.*denied'

For cluster sync (the cPanel mechanism, not AXFR), see the cluster-sync article.

What to do

  1. Default policy: deny AXFR from anywhere except cluster peers. This is what cPanel sets up automatically. Leave it.
  2. For a third-party secondary DNS (a paid hosted secondary that pulls zones via AXFR):
    • Get the secondary provider’s source IPs.
    • Add them to allow-transfer in /etc/named.conf (global) or per-zone:
zone "example.com" {
    type master;
    file "/var/named/example.com.db";
    allow-transfer { 192.0.2.10; 192.0.2.11; };
};

Some setups prefer TSIG (transaction signature) for AXFR authentication instead of IP allowlisting — more secure but more setup. cPanel doesn’t expose TSIG in the UI; it’s a manual named.conf edit.

  1. For NOTIFY (the master tells slaves to refresh), enable it in /etc/named.conf:
options {
    also-notify { 192.0.2.10; 192.0.2.11; };
};

Each slave then sees a NOTIFY and pulls via AXFR. Without NOTIFY, slaves only refresh on their schedule (the SOA refresh value, typically 3600).

  1. For zone transfer debugging, capture the wire protocol:
tcpdump -i any -nn 'port 53 and host 192.0.2.10' -w /tmp/axfr.pcap
# trigger the transfer
dig AXFR example.com @master.example.com -b 192.0.2.10
# read
tcpdump -r /tmp/axfr.pcap -A | less

Look for the TCP handshake on port 53, the AXFR query, and either the response or a REFUSED reply.

  1. For zone-leak detection, run AXFR queries from outside your network periodically. If any return data, your allow-transfer is too permissive:
dig +short AXFR example.com @your-public-ns

Should return ; Transfer failed. from a non-allowed source.

  1. If a cluster sync issue is masquerading as AXFR, remember they’re different paths. Cluster sync uses port 2087 (WHM API). AXFR uses port 53. A firewall change can break one without affecting the other.

For high-traffic zones where AXFR is expensive (every transfer ships the entire zone), consider IXFR (incremental zone transfer) — BIND supports it, and it ships only the changes since the previous serial. Configure with provide-ixfr yes on the master.

Stack Harbor configures AXFR allowlists and integrates third-party secondaries as part of cPanel server administration.