动态域名解析=花生壳=ddns ==dns+dhcp
配置dhcp服务(在服务端)
yum install dhcp -y
cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
vim /etc/dhcp/dhcpd.conf
option domain-name "westos.com";
option domain-name-servers 172.25.254.61; 服务端ip
DNS的key更新
配置dhcpd.conf
14行 ddns-update-style interim;
文件最后添加可更新DNS的key
key dns的key名称 {
algorithm hmac-md5;
secret dns 加密字符;
};
文件最后添加要更新的 域信息
zone westos.com. {
primary 127.0.0.1;
key westoskey;
}
systemctl restart dhcpd
测试 设置一台主机的dhcp网
hostnamectl set-hostname game.westos.com
设主机名称为 xxx.域名.com
重启客户端网络看解析
重新hostnamectl set-hostname music.westos.com
标签:dns,dhcpd,westos,花生壳,key,linux,dhcp,com From: https://blog.51cto.com/u_15883840/5870325