I. Planning INSTRUCTIONS:
Host A: Dual NIC
192.168.1.7--> mydomain.org Primary Domain name server
192.168.10.7--> myzone.org The primary domain name server, which has two subdomains, for market.myzone.org and develog.myzone.org
Host B: Dual NIC
192.168.1.6--> mydomain.org Auxiliary domain name server
192.168.10.6--> market.myzone.org Sub-domain name server
Both servers have DNS-independent logs for logging query (query_logs) records and Error (Err_logs) records for later DNS management; This article does not have much to do with security concerns.
For installation please refer to another article "Bind 9.4.0RC2 installation Notes (Learn to configure easy DNS)".
Second, host A:
1. Main configuration file/etc/named.conf
Options {
Directory "/var/named/";
Version "0.0.0";
};
Logging {
Channel Dns_errors
{file "/var/log/named/err_logs" versions 3 size 10m;
Severity error;
Print-category Yes;
Print-severity Yes;
Print-time Yes;
};
Channel Dns_queries
{file "/var/log/named/query_logs" versions 3 size 10m;
Severity info;
Print-category Yes;
Print-severity Yes;
Print-time Yes;
};
Category default {dns_errors;};
Category queries {dns_queries;};
};
Zone "." {
Type hint;
File "named.ca";
};
Zone "localhost" {
Type master;
File "Named.local";
};
Zone "0.0.127.in-addr.arpa" {
Type master;
File "Named.rev";
};
Zone "mydomain.org" {
Type master;
File "Mydomain.org.zone";
Allow-transfer {192.168.1.6/32;};
};
Zone "myzone.org" {
Type master;
File "Myzone.org.zone";
Allow-transfer {192.168.10.0/24;};
};
Zone "10.168.192.in-addr.arpa" {
Type master;
File "192.168.10.zone";
Allow-transfer {192.168.10.0/24;};
};
Zone "1.168.192.in-addr.arpa" {
Type master;
File "192.168.1.zone";
Allow-transfer {192.168.1.6/32;};
};
Key "Rndc-key" {
Algorithm HMAC-MD5;
Secret "oklrll8bolnj883ox1ycxq==";
};
Controls {
inet 127.0.0.1 Port 953
Allow {127.0.0.1} keys {"Rndc-key";};
};
# End of named.conf