您的位置:首页 > 其它

dnsmasq安装

rengzhixin 2019-06-18 17:51 295 查看
yum  -y  install dnsmasq
[root@testaaaaa ~]# cat /etc/dnsmasq.conf
resolv-file=/etc/resolv.dnsmasq.conf
no-hosts
addn-hosts=/dev/shm/dnsrecord.txt
cache-size=1024
conf-dir=/etc/dnsmasq.d,.rpmnew,.rpmsave,.rpmorig
listen-address=172.17.125.239 
[root@testaaaaa ~]# cat /dev/shm/dnsrecord.txt 
10.10.10.1 www.123.com
10.10.10.2 www.456.com
10.10.10.3 www.sina.com
[root@testaaaaa ~]# 
然后每次增加解析重启下dnsmasq
客户端就改为dnsmasq的ip即可


标签: