A few helpful Bind DNS server configuration options

Wednesday, 17th March 2010

It’s quite useful in bind to have the following configurations options in either named.conf options {} configuration block or (in case if on Debian Linux in named.conf.options.
Please edit your required file respectively and find the options {} directive and set within the options {} block the following:


zone-statistics yes;
notify yes;
transfer-format many-answers;

Here I have to clarify that the zone-statistics directive instructs the server to collect statistical data about all zone files, this statistics can later be accessed via the:
rndc stats command.

transfer-format many-answers is actually a default directive since bind 9 and you might even like to skip that one if on bind version 9 or 9+
notify yes; – will instruct the nameserver to replicate change in zone files to a seconday configured name server.

Another really vital thing in my view is to enable Bind DNS server logging into file.

In order to do that put in named.conf:

logging {
channel _default_log {
file "/var/log/named/named.log";
severity debug;
print-time yes;
};
category default {
_default_log;
};

Note that it’s required to create the log file with proper permissions as in the location where specified in the above configuration in this case /var/log/named/named.log :


debian-server# mkdir -p /var/log/named
debian-server# touch /var/log/named/named.log
debian-server# chown -R bind:bind /var/log/named/

In this case I change the directory and file to be owned by the bind user and group, however on different linux distribution like Redhat the user could be different like on Redhat the user is usually named.
To find the correct user permissions check the user with which the Bind server is running using a simple:

debian-server# ps axu|grep -i bind
or
# ps axu|grep -i named

Share this on:

More helpful Articles

Download PDFDownload PDF

Tags: , , ,

One Response to “A few helpful Bind DNS server configuration options”

  1. admin says:
    Firefox 47.0 Firefox 47.0 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0

    For newer BIND 9 servers lets say running on Debian 6 / 7/ 7 in order to enable logging add following configuration to /etc/bind/named.conf.options:

    logging{
    channel simple_log {
    file “/var/log/named/bind.log” versions 3 size 5m;
    severity warning;
    print-time yes;
    print-severity yes;
    print-category yes;
    };
    category default{
    simple_log;
    };
    };

    View CommentView Comment

Leave a Reply

CommentLuv badge