pkg install bind910
ln -s /usr/local/etc/namedb /etc/namedb
echo 'named_enable="YES"' >> /etc/rc.conf
cd /etc/namedb
mv named.conf named.conf.bak
cp /back/src/named.conf ./
check-names ignore;
cp rndc.conf.sample rndc.conf
rndc-confgen -a
cat rndc.key >> rndc.conf
cat rndc.key >> named.conf
rm rndc.key
## rndc.conf
options {
default-server localhost;
default-key "key";
};
server localhost {
key "key";
};
key "key" {
algorithm hmac-md5;
secret "s6hue**********+OZ6ruJA==";
};
## named.conf
acl localnet { 127.0.0.1; 192.168.0.0/16; };
acl groupnet { 125.53.25.128/26; };
recursion no;
allow-transfer { localnet;groupnet; };
// listen-on { 127.0.0.1; };
key "key" {
algorithm hmac-md5;
secret "s6hue**********+OZ6ruJA==";
};
controls {
inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "key"; };
};
include "/usr/local/etc/namedb/slave.zones" ;
FreeBSD