Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

CentOS7 DNS master-slave synchronization

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

192.168.80.102 main

192.168.80.103 from

Both master and slave must be closed

systemctl stop firewalld

setenforce 0

On the primary DNS: (192.168.80.102)

First sync time:

yum install ntp -y

yum install bind -y

vi /etc/ntp.conf

Add the following three lines at the specified locations

restrict 192.168.80.0 mask 255.255.255.0 nomodify notrap

server 127.127.1.0

fudge 127.127.1.0 stratum 8

-

start the service

service ntpd start

start automatically when the system

systemctl enable ntpd

-

On the slave domain name server: 192.168.80.103

yum install ntp -y

ntpdate 192.168.80.181 master server time with slave

Go to main service 80.102vi /etc/named.conf

#Forward and reverse parsing file storage directory, preceded by a backslash representative comment

Modify the following:

listen-on port 53 { any; };

allow-query { any; };

vi /etc/named.rfc1912.zones Add the following at the bottom zone "hello.com" IN { type master; file "hello.com.zone"; allow-update { 192.168.80.103; }; also-notify { 192.168.80.103; };};zone "80.168.192.in-addr.arpa" IN { type master; file "hello.com.local"; allow-update { 192.168.80.103; }; also-notify { 192.168.80.103; };};

cd /var/named/

cp -p named.localhost hello.com.zone

vi hello.com.zone

cd /var/named/cp -p named.localhost hello.com.zonevi hello.com.zone$TTL 1D@ IN SOA hello.com. 3040401509.qq.com ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS dns.hello.com.dns IN A 192.168.80.102www IN A 192.168.80.103ftp IN A 192.168.80.104

Region Resolution Library:

resource record rr

SOA: Initial authorization record, a zone file can have only one.

NS: Authorized zone (which DNS server is authorized).

MX: Mail exchanger, MX records have priority attributes 0-99, the lower the number the higher.

A: Convert FQDN to IP address.

PTR:IP to FQDN conversion.

AAAA:FQDN -- IPV6。

CNAME: Official name.

cp -p hello.com.zone hello.com.localvi hello.com.local$TTL 1D@ IN SOA hello.com. 3040401509.qq.com ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS dns.hello.com.102 IN PTR dns.hello.com.103 IN PTR www.hello.com.

systemctl start named //start dns service

netstat -anpt | grep named

80.103: yum install bind -yvi /etc/named.conf liste-on port 53 { any; };allow-query { any; };vi /etc/named.rfc1912.zones#Add zone "hello.com" IN { type slave; masters { 192.168.80.102; }; file "slaves/hello.com.zone";};zone "80.168.192.in-addr.arpa" IN { type slave; masters { 192.168.80.102; }; file "slaves/hello.com.local";};

systemctl start named #Start server

cd /var/named/slaves/cat hello.com.zone

There's some garbled code here.

Solution:

vi /etc/named.conf

masterfile-format text ;

systemctl restart named restart service

cat hello.com.zone

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report