安装
yum install dnsmasq -y
配置
nano /etc/dnsmasq.conf
resolv-file=/etc/resolv.dnsmasq.conf //设置解析文件
strict-order //放开#注释
listen-address=公网/局域网IP地址,127.0.0.1
addn-hosts=/etc/dnsmasq.hosts
nano /etc/resolv.dnsmasq.conf
nameserver 127.0.0.1
nameserver 119.29.29.29
nameserver 182.254.116.116
nameserver 114.114.114.114
nameserver 114.114.114.115
nameserver 223.5.5.5
nameserver 223.6.6.6
nano /etc/dnsmasq.hosts
10.201.11.222 local //ping local 会指向10.201.11.222
启动
service dnsmasq start
评论 (0)