1. Master Configuration named.conf Configure the DNS server, it is important to note that the named.conf file permissions and the owner of the named user acl inside { 172.16.0.0/16; 192.168.0.0/16; 127.0.0.0/8;};/ /acl must be at the top of the options { listen-on port 53 { any; }; //do not write this as Any,acl has made a strategy, here do not limit the directory "/var/named"; //space-related configuration directory, if Chroot is used, you need to specify to the relevant directory//the following three for the data file, Can be cleared according to the situation dump-file " /var/named/data/cache_dump.db "; statistics-file "/var/ Named/data/named_stats.txt "; memstatistics-file "/var/ Named/data/named_mem_stats.txt ";//Set the client upper-level DNS provider, CONFIGURED here, hint type specified named.ca configuration is no longer effective, withBody to watch logs forwarders { 114.114.114.114; 202.96.209.133; 202.96.209.5; 8.8.8.8; };// allow-update { any; }; //allow clients to automatically update dnssec-enable no; dnssec-validation no;// dnssec-lookaside auto; auth-nxdomain no;};/ /Log logging { channel default_debug { file "Data/named.run"; severity dynamic; };}; zone "." IN { type hint; file "named.ca";};/ /custom Domain name space zone "Name2ip" { type master; file "Name2ip.zone"; allow-update {none;};}; zone "0.168.192.in-addr.arpa" { type master; file "Ip2name-arpa.zone"; allow-update {none;};}; include "/etc/named.rfc1912.zones";include "/etc/named.root.key";2. configuration Name2ip.zone, forward parsingFile $ttl 600 //data can be recorded in the DNS cache for how long, in seconds, for the cache time @ in soa test.com. root.test.com. ( //full host name, is the hostname of the first authorized machine, SOA refers to the initial authorization record 2013101501 //serial, set slave and master Sync reference, for time "Month Day" 300 //refresh, set slave active update Time       &NBsp; 30 //retry,slave Retry time interval 300 //If slave is not connected, it will not update 600 //setting Slave cache time )//@ Representative of the NAMED.CONF zone defined Name.com,in representative began to write records, the SOA representative began to set, first set the full domain name name.com, and then set the domain administrator root.name.com@ IN NS ns.test.com. //ns represents a domain name server mail in mx test.com. // MX on behalf of mail server ns in a ipaddress // Host record of the domain name server www in a ipaddress                //A represents forward parsing, Represents the IP address of the forward parsing WWW service wwww in cname ipaddress //cname stands for alias * in a ipaddress //* represents pan-Analytic note: You can add nameserver in/etc/resolve.conf IPAddress Add a DNS server, named-checkconf can detect DNS configuration file error messages, Named-checkzone name.com /path can see if zone files are error 3. configuration ip2name.zone, reverse parse file $ttl 600@ in soa test.com. root.test.com. ( 2013101501 300 30 300 600 )@ in nsns in a ipaddressIP IN PTR www.test.com //ptr represents the reverse resolution, IP refers to the last 4. of the server network address Configure the secondary DNS server 1. edit name.confoptions{ directory "/var/named";}; zone "Name.com" { type slave; file "Name.zone " masters { master-server-ipaddress;};};
This article is from the "Letter" blog, please be sure to keep this source http://leon0long.blog.51cto.com/3011404/1768461
Centos6.4 Configuring the DNS server Configuration sample simple solution