使用overture搭建DNS无污染递归服务器 可设置Host过滤广告

overture开源项目:https://github.com/shawn1m/overture

overture是一个DNS服务程序,RainDNS也是采用这款程序搭建的,最大的特点就是小巧、快速,支持Linux和Windows环境,且是开源项目放心安全,可以用来搭建企业DNS服务。


overture工作配置流程

下载overture

前往Github下载:https://github.com/shawn1m/overture/releases

由于我的系统是Centos7 64位的,所以我下载了overture-linux-amd64.zip

释放overture

unzip -d /usr/local/overture overture-linux-amd64.zip

修改config.json

{
"BindAddress": ":53",
"PrimaryDNS": [
{
"Name": "RainDNS",
"Address": "119.28.28.28:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": ""
}
}
],
"AlternativeDNS": [
{
"Name": "RainPOd",
"Address": "119.29.29.29:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": ""
}
}
],
"OnlyPrimaryDNS": false,
"RedirectIPv6Record": false,
"IPNetworkFile": "./ip_network_sample",
"DomainFile": "./domain_sample",
"DomainBase64Decode": true,
"HostsFile": "./hosts_sample",
"MinimumTTL": 0,
"CacheSize" : 0,
"RejectQtype": [255]
}

【BindAddress】DNS端口,默认为53
【PrimaryDNS】主DNS
其他配置信息可以阅读overture的Github底部

修改防火墙

firewall-cmd --permanent --add-port=53/udp
firewall-cmd --permanent --add-port=53/tcp
firewall-cmd --reload

配置开机启动 vi /etc/systemd/system/overture.service

[Unit]
Description=overture
After=network.target
[Service]
ExecStart=/usr/local/overture/overture-linux-amd64 -c /usr/local/overture/config.json
Restart=on-abort
[Install]
WantedBy=multi-user.target

启动overture

systemctl enable overture
systemctl start overture

0

评论0

抱歉,请先登录QQ后才能开启评论!

因博主在备考,图片丢失无法加载问题等过一阵有空再修复吧。
没有账号? 注册  忘记密码?

社交账号快速登录

')})();