
目录
评论加载中……
使用dnsmasq搭建私人DNS服务器
安装
yum install dnsmasq -y
配置
修改resolv.dnsmasq.conf配置文件
vim /etc/resolv.dnsmasq.conf
resolv-file=/etc/resolv.dnsmasq.conf
strict-order
addn-hosts=/etc/dns.hosts
cache-size=100
bogus-nxdomain=114.114.114.114
server=/google.com/8.8.8.8
log-queries
log-facility=/var/log/dnsmasq.log
解析增加默认nameserver
vim /etc/resolv.dnsmasq.conf
nameserver 192.168.0.168
nameserver 114.114.114.114
nameserver 8.8.8.8
hosts填写自建的dns解析
vim /etc/dns.hosts
192.168.0.168 kuma.test.top
设置
systemctl start dnsmasq
systemctl enable dnsmasq
测试
systemctl status dnsmasq
ping kuma.test.top
重启
systemctl restart dnsmasq
赞赏
Wechat

