Topic: How to secure zone transfers?

Recently I read about AXFR attacks. How can I prevent them in Bind 9?


Re: How to secure zone transfers?

If you have two DNS servers, which we will refer to as ns1 ( and ns2 ( ns1 serves as the master for the '' zone, and ns2 slaves this zone off the primary. Then to secure your Bind configuration, you should add following lines to your named.conf:


acl "xfer" {;

zone "" IN {
        type master;
        file "/path/to/zone/file/";
        notify yes;
        allow-update { none; };
        allow-query { any; };
        allow-transfer { xfer; };


zone "" IN {
        type slave;
        masters {; };
        file "/path/to/zone/file/";
        notify no;
        allow-query { any; };
        allow-transfer { none; };

To check that AXFR secured run command:

# dig axfr

And you will see something like this:

; <<>> DiG 9.8.5-P1 <<>> axfr
;; global options: +cmd
; Transfer failed.