The primary DNS configuration from the synchronization linux

DNS (Domain Name Server) ---> Domain Name Service
DNS protocol runs over TCP and UDP protocol, TCP protocol is responsible for the link, which is responsible for parsing the UDP protocol, port number are 53 ports
experimental environment: CentOS 7.3
DNS host: 192.168.1.44
DNS slave: 192.168.1.54
primary DNS server is configured

DNS under Linux is to use bind implemented
procedures were named
the main program / usr / sbin / named
master configuration file /etc/named.conf
domain profile /etc/named.rfc1912.zones
resource configuration file / etc / named / under
the master dns server is configured
to download software named bind service
The primary DNS configuration from the synchronization linux
boot and start the service named
The primary DNS configuration from the synchronization linux

Close SELinux
View SELinux state
The primary DNS configuration from the synchronization linux
Note ---> experimental temporary settings, such as permanent in the configuration file / etc / sysconfig / selinux set
to join firewall mechanism
dns added firewall mechanism
The primary DNS configuration from the synchronization linux
view firewall mechanism
The primary DNS configuration from the synchronization linux
routing function enabled
The primary DNS configuration from the synchronization linux
NOTE ---> to be in / proc / sys / net / ipv4 / ip_forward profile settings
view named port opening 53 where
The primary DNS configuration from the synchronization linux
the configuration of the cache server forward resolution
master profile settings
The primary DNS configuration from the synchronization linux
modified file lines 13 and 19 within {} is any, 20 disposed forward line telecommunication server dns
The primary DNS configuration from the synchronization linux
34 lines changed to no close dns verification security
The primary DNS configuration from the synchronization linux
checks profile
The primary DNS configuration from the synchronization linux
domain profile settings
The primary DNS configuration from the synchronization linuxThe primary DNS configuration from the synchronization linux
resource profile settings
The primary DNS configuration from the synchronization linux
to copy and save the file original attributes
The primary DNS configuration from the synchronization linux
modify file
The primary DNS configuration from the synchronization linux
The primary DNS configuration from the synchronization linux
check file syntax
The primary DNS configuration from the synchronization linux
to reload the
The primary DNS configuration from the synchronization linux
view loading conditions
The primary DNS configuration from the synchronization linux
test domain case
testing tool dig and nslookup, general use dig content full
dig test
The primary DNS configuration from the synchronization linux

Internal dedicated test
CNAME provided polling
The primary DNS configuration from the synchronization linux
test
The primary DNS configuration from the synchronization linuxThe primary DNS configuration from the synchronization linux
.


Configuring a reverse caching server to resolve
set up a domain configuration file
The primary DNS configuration from the synchronization linux
resource profile settings
The primary DNS configuration from the synchronization linux
The primary DNS configuration from the synchronization linux

Reload test
The primary DNS configuration from the synchronization linuxThe primary DNS configuration from the synchronization linux
.


配置双向解析的缓存服务器
查看帮助文档,双向解析配置
The primary DNS configuration from the synchronization linuxThe primary DNS configuration from the synchronization linux
主配置文件设置
The primary DNS configuration from the synchronization linuxThe primary DNS configuration from the synchronization linux
域配置文件设置
The primary DNS configuration from the synchronization linux
The primary DNS configuration from the synchronization linux
注 ---> 对内ip改为192.168.0.0/24网段
资源配置文件设置
The primary DNS configuration from the synchronization linux

The primary DNS configuration from the synchronization linux
重新加载,本地主机测试
The primary DNS configuration from the synchronization linux
注 ---> 非本地主机还是对外ip:172.25.254.131

.


DNS 主从同步配置

主从同步:主每次修改配置文件需要修改一下序列号,主从同步主要 看序列号
从DNS:从是可以单独修改,主从不会报错。但从修改后,主端同步给从后 从端修改数据会丢失
主从原理:从会监听主的 TCP 53 端口,它会隔一段时间去探测 序列号如果主端 序列号更新后 从端探测到会 将主端内容 同步到本地
同步模式:从主动探测时间比较缓慢,可以设置主端,每次变更序列号时主动将,数据信息,推送给从DNS端

从dns服务器配置
主配置文件设置
!The primary DNS configuration from the synchronization linux
修改文件中的13和19行中{}内为any
The primary DNS configuration from the synchronization linux
域配置文件设置
The primary DNS configuration from the synchronization linuxThe primary DNS configuration from the synchronization linux
注 ---> type slave类型为从dns服务类型,masters{{xxx}主dns服务器地址
修改etc/resolv.conf文件为从dns服务器地址172.25.254.31
The primary DNS configuration from the synchronization linuxThe primary DNS configuration from the synchronization linux
主dns服务器www地址改为172.25.254.188重新加载
The primary DNS configuration from the synchronization linux
注 ---> 序列号修改为设置更改的时间,每次更改都要变更序列号
更改www地址
The primary DNS configuration from the synchronization linux
从dns服务器重新加载,dig测试
The primary DNS configuration from the synchronization linux
注 ---> 主从同步完成
.


Remote data updating dns
remote server profile settings dns
The primary DNS configuration from the synchronization linux
Note ---> allow-update allows to ip 172.25.254.31 remote server update data, also-notify to synchronize data received
local file server dns permission to modify
The primary DNS configuration from the synchronization linux
the local server remote synchronization data dns
The primary DNS configuration from the synchronization linux
dns server remote test dig, dig hello.test.com
local dns server test dig, dig hello.test.com
data synchronization complete
local dns server generates synchronous data file
The primary DNS configuration from the synchronization linux
Note ---> generate a data file type, view and edit not
available hexdump View binary file
The primary DNS configuration from the synchronization linux

Guess you like

Origin blog.51cto.com/14190777/2426895