Shutting down the firewall on the server, desktop host
Firewall-cmd--permanent--add-server=dns
Firewall-cmd--reload
Vim/etc/named.conf
Set slave on the desktop host and set masters on the server
Vim/etc/named.conf
Vim/etc/namewd.rfc1912.zones
Systemctl Start named
Vim/etc/resolv.conf
Note: When setting the domain name resolution address, server and desktop each write their own IP
NameServer 172.25.254.150
When you set slave DNS to update, you need to turn on permissions for DNS files in the server
chmod 770/var/named
Vim/etc/named.rfc1912.zones
Nsupdate /* Remote update DNS domain name configuration
>server 172.25.254.150
>update Delete www.westos.com
>send
>server 172.25.254.150
>update add www.westos.com 86400 A 172.25.254.111
>send
>quit
If the DNS content update fails refuse is not given file permissions, Servfail is usually a firewall is not closed
Set key authentication DNS, this setting ensures the security of DNS
Dnssec-keygen-a hmac-md5-b 128-n HOST westos/*-a encryption algorithm,-B encryption length,-N encryption owner type
Cp-p/etc/rndc.key/etc/westos.key/* Copy encrypted files to generate your own encrypted files
Vim/etc/westos.key/* Add new encryption characters to the encrypted file, note modify the file header name
vim/etc/named.conf/* Add key Authentication file
Vim/etc/named.rfc1912.zones/* Allow DNS updates to be changed to key authentication
SCP kwestos.*******.* [Email protected]:/mnt/* Send key to specified IP location
Nsupdate-k-kwestos.******.private/* Login with key
Dynamic Domain name analysis of peanut shell
1. Installing the DHCP service
Yum Install Dhcp-y
Cp-p/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example/etc/dhcp/dhcpd.conf
2. Edit the DHCP file to associate DNS with DHCP
Option Domain-name "westos.com";
Option Domain-name-servers 172.25.254.150;
Ddns-update-style Interim;/* This is how dynamic DNS is updated
Subnet 172.25.254.0 netmask 255.255.255.0 {
Range 172.25.254.220 172.25.254.230;
Optiaon routers 172.25.254.150;
}
Key Westos {/* Update key
Algorithm HMAC-MD5;
Select ****************;
};
Zone westos.com. {/* This is to update zone, if this is the DNS server,primary write primary 127.0.0.1; 127.0.0.1 If the other machine is DNS server, write the IP of that machine.
Key Westos;
}
3. Test whether the DNS of the local computer can be automatically resolved with the client
Hostnamectl Set-hostname 666.westos.com
Dynamic Domain name resolution making