On a Centos 5.4 install I have the following installed Code:
bind-utils-9.3.6-4.P1.el5_4.2
bind-chroot-9.3.6-4.P1.el5_4.2
bind-9.3.6-4.P1.el5_4.2
bind-libs-9.3.6-4.P1.el5_4.2
You would ideally want to install the chroot package from a security perspective. Once that is done all the main config files will reside under /var/named/chroot/etc. Here is a simple split view templated Code:
acl "dns_slaves" {
XXX.XXX.XXX.XXX;
XXX.XXX.XXX.XXX;
};
acl "trusted" {
192.168.1.0/24; # network address of your local LAN
127.0.0.1; # allow loop back
localnets;
};
options { # this section sets the default options
directory "/var/named"; # directory where the zone files will reside
listen-on {
XXX.XXX.XXX.XXX; # IP address of the local interface to listen
127.0.0.1; # ditto
};
pid-file "/var/run/named/named.pid";
auth-nxdomain no; # conform to RFC1035
recursion no; # disallow recursive queries unless over-ridden below
version "0"; # obscures version reporting - can't hurt
allow-transfer { dns_slaves; };
allow-query { trusted; };
allow-query-cache { trusted; };
};
logging {
category lame-servers { null; };
};
controls {
inet 127.0.0.1 allow { localhost; }
keys { rndc-key; };
};
view "internal" {
match-clients { trusted; }; # match hosts in acl "trusted" above
allow-query { any; }; # allow anyone to issue queries
recursion yes; # allow recursive queries
notify no; # disable AA notifies
additional-from-auth yes;
additional-from-cache yes;
zone "." {
type hint;
file "data/static/named.ca";
};
zone "localhost" {
type master;
file "data/static/localhost.zone";
};
zone "127.in-addr.arpa" {
type master;
file "data/static/127.zone";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "data/internal/1.168.192.zone";
};
zone "XXXXXXXXXX.XXX" {
type master;
file "data/internal/XXXXXXXXXX.XXX.zone";
};
};
view "external" {
match-clients { any; };
recursion no;
allow-transfer { dns_slaves; };
additional-from-auth no;
additional-from-cache no;
zone "." in {
type hint;
file "data/static/named.ca";
};
zone "XXXXXXXXXX.XXX" {
type master;
file "data/external/XXXXXXXXXX.XXX.zone";
allow-query { any; };
};
};
view "chaos" chaos {
match-clients { any; };
recursion no;
zone "." {
type hint;
file "/dev/null";
};
zone "bind" {
type master;
file "data/static/db.bind";
allow-query { trusted; };
allow-transfer { none; };
};
};