dnsmasq 设置自动获取主机名

A1_IP:192.168.164.145

A1# yum install dnsmasq -y

A1# echo "addn-hosts=/etc/domains" >> /etc/dnsmasq.conf

A1#  echo "192.168.164.145 www.kd.com" > /etc/domains

A1# iptables -I INPUT -p udp --dport 53 -j ACCEPT

A1# systemctl start dnsmasq && systemctl enable dnsmasq

 B1_IP:192.168.164.189

B1 # 看图

自动改动就可以实现

猜你喜欢

转载自www.cnblogs.com/S--S/p/10561878.html