DNS master-Slave server implementation under Linux

Source: Internet
Author: User
Tags domain name server dnssec nameserver

Case Environment:
Primary Domain Name server: ns1.zdj.com,172.17.0.142
From the domain name server: ns2.zdj.com,172.17.0.37
Both servers are capable of providing domain name resolution for zdj.com zones

Primary Domain Name server: 1. ip:172.17.0.142
[[email protected] var]# vim/var/named/chroot/etc/named.rfc1912.zones----Add the following:
Zone "Zdj.com" in {
Type master;
File "zdj.com";
allow-transfer{172.17.0.37;};
};
Zone "0.17.172.in-addr.arpa" in {
Type master;
File "172.17.0.zone";
Allow-transfer {172.17.0.37;};
};

2.
[Email protected] named]# vim zdj.com--------Edit the following---forward parsing
$TTL 1D
@ in SOA ns1.zdj.com. Root.zdj.com. (
0; Serial
1D; Refresh
1H; Retry
1W; Expire
3H); Minimum
@ NS ns1.zdj.com.
@ NS ns2.zdj.com.
NS1 A 172.17.0.142
NS2 A 172.17.0.37
www A 172.17.0.123
www A 172.17.0.122
www A 172.17.0.124
Web CNAME www---------alias
* A 172.17.0.252

3.
[Ro[email protected] named]# vim 172.17.0.zone--------Edit the following-----reverse resolution
$TTL 1D
@ in SOA ns1.zdj.com. Root.zdj.com. (
0; Serial
1D; Refresh
1H; Retry
1W; Expire
3H); Minimum
@ NS ns1.zdj.com.
@ NS ns2.zdj.com.
142 PTR ns1.zdj.com.
Panax Notoginseng PTR ns2.zdj.com.
123 PTR www.zdj.com.
124 PTR www.zdj.com.
122 PTR www.zdj.com.

4.
[[email protected] named]# cat/etc/resolv.conf---------set up the DNS server for yourself, test with
; Generated By/sbin/dhclient-script
#nameserver 8.8.8.8
NameServer 172.17.0.142
5.
[Email protected] named]# service named RestaRt

From the domain name server: ip:172.17.0.37
1.
[[email protected] slaves] #vim/var/named/chroot/etc/named.conf
Options {
Listen-on Port 53 {172.17.0.37;};
Listen-on-v6 Port 53 {:: 1;};
Directory "/var/named";
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";
allow-query {any;};
recursion Yes;

# dnssec-enable Yes;
# dnssec-validation Yes;
# Dnssec-lookaside Auto;

/* Path to ISC DLV key */
# bindkeys-file "/etc/named.iscdlv.key";
};

2.
[[email protected] slaves] #vim/var/named/chroot/etc/named.rfc1912.zones------------Add the following

Zone "Zdj.com" in {
Type slave;
Masters {172.17.0.142;};
File "slaves/zdj.com";

};

Zone "0.17.172.in-addr.arpa" in {
Type slave;
Masters {172.17.0.142;};
File "Slaves/172.17.0.zone";

};

3.[[email protected] slaves] #service named restart

Test machine
[Email protected] ~]# vim/etc/resolv.conf
; Generated By/sbin/dhclient-script
#nameserver 59.51.78.211
#nameserver 222.246.129.81
NameServer 172.17.0.142
[Email protected] ~]# host www.zdj.com
Www.zdj.com has address 172.17.0.123
Www.zdj.com has address 172.17.0.124
Www.zdj.com has address 172.17.0.122
[Email protected] ~]# host 172.17.0.122
122.0.17.172.IN-ADDR.ARPA Domain name Pointer www.zdj.com

DNS master-Slave server implementation under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.