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.189 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 # 看图

dnsmasq 设置自动获取主机名

自动改动就可以实现

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-28
  • 2022-12-23
  • 2021-11-12
  • 2022-02-16
  • 2021-11-27
  • 2021-12-03
  • 2022-12-23
相关资源
相似解决方案