DDNS principle: DNS + DHCP = DDNS
DHCP is responsible for ip resolution and allocation to the Client ip address. The ip address is a random number.
DNS is responsible for domain name resolution. The A record records the domain name corresponding to each ip address.
The Client ip address must be changed, and it is impossible to use an ip address all the time. Therefore, when the client ip address changes, the DDNS service is used and the record of the DNS is notified so that it can be updated synchronously, otherwise, the host cannot be found when someone accesses your domain name.
Test environment: the DNS encryption configuration is complete.
By default, DHCP cannot start the software package.
Valid row of the DHCP service configuration file:
The domain "example. Com" uses the DNS service domain, and the server writes the ip address of the DNS service. The server mustFixedIp,
Note that the IP address is a fixed ip address. If you enable the graphical interface, you must disable NetworkManger, which has a great impact and cannot be resolved even if your service is successfully set up.
Server
First, set up the dhcp service:
Host:
Update the DNS server using DHCP: DDNS service:
The premise is that the DNS has been encrypted and updated to generate a key.
The following content can be obtained by entering the keyword key in man dhcp. conf, and then added to the configuration file of the DHCP service.
The following westos key is the key generated by DNS. prinary 127.0.0.1 allows local DHCP to update the DNS service.
The DNS service must use key update:
Client:
File Content:
The Client ip address is dynamic dhcp. Restart the network.
The following Parsing is done on the server.
If you can't resolve the problem, use
Dig redhat.example.com.example.com can be parsed. It must beNetworkManager problem. If it is disabled, it will be OK.