1. 程式人生 > >dnsmasq 設置自動獲取主機名

dnsmasq 設置自動獲取主機名

iptable put onf tables art 實現 png bubuko start

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 # 看圖

技術分享圖片

自動改動就可以實現

dnsmasq 設置自動獲取主機名