BIND 9.9.X – How to view BIND Slave Zone files?

If you recently update your BIND server to version 9.9.X, you will noticed that you unable to read slave zone file.

Below is the example of zone file

As per checking on BIND official release notes from ISC, BIND version 9.9.x store Slave Zones file in raw/binary format.

In order to view the content of Slave Zone file, you need to convert “raw” format zone files to “text” format using the named-compilezone utility that comes with BIND.

Example: convert raw zone file “” that contain data for zone “”, to text file called “”

named-compilezone -f raw -F text -o

However, there is another workaround method by enforce the Slave Zone files store in text format. This method is not recommended if your DNS server host a lot of zone files with a lot of records as this will affect the BIND Server performance. Bind Server need to take time to encode and decode the Zone files.

How to do it?

To do that, you just need to add the string “masterfile-format text” in to named.conf.


options {
// various named config options
masterfile-format text;
// the rest of the config

For testing purpose, i only enable this option to one of the zone files. Below are the sample of configuration

zone “” IN {
type slave;
file “internal-zone/”;
masterfile-format text;
masters {; };
allow-transfer {; };

Leave a Reply

Your email address will not be published. Required fields are marked *