centos7 build dnsIPv4 records and IPv6 records

Previous IPv6 address assignment has been achieved kea-dhcp, Next to begin configuring DNS.
Specific needs:
1.master dns-record ns 192.168.23.10 2001 dns1.langqun.com: DA8: 1000: 1000: 192: 168: 23: 10
Slave dns-record ns dns2.langqun.com 192.168.23.11 2001: da8: 1000: 1000: 192: 168: 23: 11
2. Add www.langqun.com A record 192.168.23.100 2001: da8: 1000: 1000 : 192: 168: 23: 100
was added web.langqun.com CNAME record www.langqun .com
software selection:
traditional use bind software, which we are more familiar with the operating manual is also relatively easy to find.
unbound software is more practical, more powerful, relatively few online operating manual, only the official website to check. Here bind to the operator.
Embodiment steps:
1. Select the main ns1.langqun.com 192.168.23.10 2001 the DNS: DA8: 1000: 1000: 192: 168: 23 is: 10
2. performed yum -y install bind * installation; rpm -aq bind point after the installation Check whether the installation is complete.

3. Compile named.conf:
the /etc/named.conf vim
line 13, No. 14 Monitor the local IPv4 and IPv6 addresses;
Line 21 allows any queries over, the policy is to make access control;
centos7 build dnsIPv4 records and IPv6 records

  在57行之后添加以下内容:
        ![](https://s1.51cto.com/images/blog/201912/09/2a5a67a6ce6f9efafadcd4cd29b8c67f.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

There is the added secret key information for rndc, rndc is dns manager, then with this tool every time you do not need to restart dns service, you only need to execute rndc reload.
The default is in the rndc /etc/rndc.conf, various error when loading rndc, finally find a lot of reasons rndc can only copy files to the named.conf file.
2. Compile vim /etc/named.rfc1912.zones
at the bottom add:
centos7 build dnsIPv4 records and IPv6 records

Here's allow-transfer is the primary backup dns server synchronization, be sure to configure the main DNS, otherwise there will be a security risk zone transfer of ***.
zone "langqun.com" forward parsed content;
Zone "23.168.192.in-addr.arpa" reverse area analysis content;
3.bind's configuration file is / var / named / below, so that folder in modifying the configuration file;
vim /var/named/langqun.com.zone (langqun.com.zone custom profiles, defined according to their actual situation)
centos7 build dnsIPv4 records and IPv6 records

Once you've configured To check the configuration complete, check whether the syntax errors. Execute the following command
named-checkconf check the configuration file
named-checkzone langqun.com /var/named/langqun.com.zone examination zone configuration file
chmod 640 langqun.com.zone change file attributes
chown: named langqun.com.zone change file genus group.
Reverse zone resolution configuration, you need to compile the following:
vim /var/named/192.168.23.zone (192.168.23.zone custom configuration files, according to their actual situation defined)
centos7 build dnsIPv4 records and IPv6 records

After compiling the need to perform the following:
chgrp the named 192.168.23.zone
the chmod = O 192.168.23.zone
the named-checkconf
the named-checkzone 23.168.192.in-addr.arpa /var/named/192.168.23.zone

  1. Verify:
    centos7 build dnsIPv4 records and IPv6 records
    centos7 build dnsIPv4 records and IPv6 records
    centos7 build dnsIPv4 records and IPv6 records
    centos7 build dnsIPv4 records and IPv6 records
    5. Select ns2.langqun.com 192.168.23.11 2001: da8: 1000: 1000: 192: 168: 23: 11 arranged
    using the installation files yum install bind
    6. The compiled file
    Vim /etc/named.rfc1912.zones
    centos7 build dnsIPv4 records and IPv6 records
    Vim / etc / named.conf
    centos7 build dnsIPv4 records and IPv6 records

7. restart the slave dns
systemctl the restart named.service
the rndc reload
SystemC Status named.service can see the following:
centos7 build dnsIPv4 records and IPv6 records
8. Verify
centos7 build dnsIPv4 records and IPv6 records
centos7 build dnsIPv4 records and IPv6 records
far from the master configuration dns, the next step begins start configuration nginx.

Guess you like

Origin blog.51cto.com/1449587/2457303