35.3. dnsmasq.resolv.conf

本文涉及的产品
云解析DNS,个人版 1个月
全局流量管理 GTM,标准版 1个月
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
简介:

让dnsmasq 接管DNS解析

# vim /etc/dnsmasq.conf

resolv-file=/etc/dnsmasq.resolv.conf
resolv-file
		
		
sudo cp /etc/resolv.conf /etc/dnsmasq.resolv.conf

cat > /etc/dnsmasq.resolv.conf <<EOF
nameserver 208.67.222.222
nameserver 208.67.220.220
EOF
		
		

或者

nameserver 8.8.8.8
nameserver 4.4.4.4
		

/etc/resolv.conf 设置用本机做解析

echo "nameserver 127.0.0.1″ > /etc/resolv.conf
or
sudo vim /etc/resolv.conf
nameserver 127.0.0.1
		

reload

/etc/init.d/dnsmasq reload
or
sudo killall -s SIGHUP dnsmasq
		




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
1月前
|
域名解析 缓存 网络协议
Dnsmasq的使用
Dnsmasq的使用
68 1
|
1月前
|
安全 网络协议 Linux
sshd_conf 配置文件详解
sshd_conf 配置文件详解
36 0
|
域名解析 缓存 网络协议
|
机器学习/深度学习 Shell Apache
httpd.conf 配置
# # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions.
1042 0
|
JavaScript 开发工具 前端开发
|
开发工具