2

I have this configuration in my named server's (master server) /etc/named.conf :

zone "example.com." IN {
    type master;
    file "example.com";
    notify yes;
    allow-transfer {
            172.16.18.2;
    };

};

and this configuration in my named server's (slave server) /etc/named.conf :

zone "example.com." IN {
    type slave;
    file "example.com";
    masters {
            172.16.18.1;
    };

};

First I have problem with permission while transferring: dumping master file: tmp-2ZlzMUSOdT: open: permission denied but after some search and changing the permission of /var/named on server slave using command chmod g+w /var/named , there is no problem with transfer transfer of 'example.com/IN' from 172.16.18.1#53: Transfer completed: 1 messages, 11 records, 356 bytes, 0.005 secs (71200 bytes/sec). But /var/named/example.com file on server slave contains unexpected characters.

cat /var/named/example.com :

examplecomMhB�7onecom'sefexamplecomx*W�Q�   :�*04
examplecomv=spf1 a mx ~allEDgoogle-site-verification=-w4hjmB6hYpYT79eg3nG_BkvvIIIk03V56F369855R2b4C
                                                                                                     771046613examplecommaiexamplecom,maiexamplecomMhB�+nsexamplecomMhB�+nsexamplecomMhB�+wwexamplecomMhB�

my bind version is bind-9.9.4-29.el7_2.3.x86_64.

What is the problem?

2

You do not have a problem having unexpected characters in your BIND slave files.

After BIND 9.9, DNS slave file format was switched to binary for efficiency reasons.

You can either use special commands to view the slave files or do without the binary format all together and tell BIND to use text format instead.

The binary format optimisation should only be noticed in large setups of BIND, or when using large files for RPZ blacklisting, that often are on the order of hundred of thousands of entries, and can make BIND booting turning from a couple of seconds operation to 1 or 2 minutes.

Bind 9.9 – Binary DNS Slave file format

In order to view the raw binary content, it must be converted to text first:

named-compilezone -f raw -F text -o example.net.text example.net example.net.raw

It’s an added layer of complexity, but if you need the microscopic performance boost, that’s the way to go. For those of us that don’t see any issues with the text file format, simply update the named.conf files for your slave zones to include the line:

masterfile-format text;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.