######When bind chroot is installed, the configuration file is saved in the/var/named/chroot/etc/directory, which is actually a soft link.SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/
Configuration information:
zero
one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
thirteen
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
twenty-one
twenty-two
twenty-three
twenty-four
twenty-five
twenty-six
twenty-seven
twenty-eight
twenty-nine
thirty
thirty-one
thirty-two
thirty-three
thirty-four
thirty-five
thirty-six
thirty-seven
thirty-eight
thirty-nine
forty
forty-one
forty-two
forty-three
forty-four
forty-five
forty-six
forty-seven
forty-eight
forty-nine
[root@localhost~]# cd /var/named/chroot/etc/
[root@localhostetc]# cat named.conf
named.confThe configuration file of is as follows:
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options{
listen-onportfifty-three{any;};
listen-on-v6portfifty-three{::one;};
directory"/var/named";#Server working directory, relative path of configuration file
dump-file"/var/named/data/cache_dump.db";#The default server stores database files
At this point, the DNS server can basically run.Oh, don't forget to change/etc/resolv.conf to the IP address of your own server~Now start to create the domain and domain file.SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/
You can modify named.conf directly or create it under named.rfc1912.zones. I prefer to create it under named.rfc1912.zones.SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/
zero
one
two
three
four
five
six
seven
eight
nine
ten
[root@localhostetc]# vi /var/named/chroot/etc/named.rfc1912.zones
Pay attention to the second line@IN SOA a.com admin.a.com is very important~ Then we will create a reverse zone file. First create a reverse region in named.rfc1912.zonesSourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/
zero
one
two
three
four
five
six
seven
eight
nine
zone"a.com"IN{#This is positive
typemaster;
file"a.com.zone";
allow-update{none;};
};
zone"1.168.192.in-addr.arpa"IN{#This is the reverse
The basic creation is completed, and the forward and reverse directions are correct after testing.After referring to many network articles, the local configuration was successful without listing them one by one.SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/
Oh, yes.Don't forget to open TCP and UDP 53 ports of the firewall!! [root@localhost ~]# vi /etc/sysconfig/iptables Add the following:SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/
Reference articles are as follows: 1:http://dns-learning.twnic.net.tw/dns/main.html 2:http://www.linuxidc.com/I have read all the articles related to bind below this website 3:http://blog.sina.com.cn/s/blog_bd846d6e0101dw5q.html 4:http://yuanbin.blog.51cto.com/363003/108578/ 5:http://docs.oracle.com/cd/E24847_01/html/E22302/dnsref-13.html 6:http://www.chinaz.com/web/2011/0513/179982.shtml
Statement: This article is original by BYRD (based on Centos6.4 X64), and reprinting without permission is prohibited!
Statement: unless otherwise specifiedByrd's BlogThe content is original. Reproduction without permission is prohibited!For details, please readCopyright Statement!