安装 dnsmasq
yum install dnsmasq -y
修改配置文件:
修改配置文件:/etc/dnsmasq.conf
添加以下内容:
resolv-file=/etc/resolv.dnsmasq.conf
listen-address=127.0.0.1
no-dhcp-interface=lo
bind-interfaces
no-negcache
修改配置文件: /etc/resolv.conf
添加以下内容:
nameserver 127.0.0.1
nameserver 119.28.28.28
nameserver 114.114.114.114
修改配置文件:/etc/resolv.dnsmasq.conf
添加以下内容:
nameserver 119.29.29.29
nameserver 119.28.28.28
nameserver 114.114.114.114
nameserver 114.114.115.115
重启 dnsmasq 服务:
service dnsmasq restart
文档信息
- 本文作者:Lewin
- 本文链接:https://lewinz.com/2021/09/13/centos-6-dnsmasq/
- 版权声明:自由转载-非商用-非衍生-保持署名