Home     About Us     RSSRSS

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

August 29, 2017 by @HKw@! | Filed under centos, DNS, Linux.

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 “db.networkbox.my” that contain data for zone “networkbox.my”, to text file called “networkbox.my.text”

named-compilezone -f raw -F text -o networkbox.my.text networkbox.my db.networkbox.my

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.

Example:

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

# network-box.my
zone “network-box.my” IN {
type slave;
file “internal-zone/db.network-box.my”;
masterfile-format text;
masters { 192.168.1.120; };
allow-transfer { 192.168.1.120; };
};

← Previous

Leave a Reply

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