From 4dcb3ff7a9b85a223b2b9b0e0b5983b08c2757a7 Mon Sep 17 00:00:00 2001 From: CallMeR <9463297+callmer@user.noreply.gitee.com> Date: Wed, 13 Dec 2023 23:30:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=88=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 06.PVE制作DNS服务器.md | 2 +- src/debian/debian_dns_dnsmasq_cron.conf | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/06.PVE制作DNS服务器.md b/06.PVE制作DNS服务器.md index 8f62c0f..7d1f268 100644 --- a/06.PVE制作DNS服务器.md +++ b/06.PVE制作DNS服务器.md @@ -236,7 +236,7 @@ $ sudo systemctl enable smartdns.service ### 6.1. SmartDNS 附加配置 -本步骤为可选操作,通过安装特殊的 `SmartDNS` 配置文件,以屏蔽广告或加快中国境内域名的解析速度。 +本步骤为可选操作,通过安装 `SmartDNS` 附加配置文件,以达到屏蔽广告或加速中国境内域名解析速度的目的。 若需使用 `SmartDNS` 屏蔽广告,则需下载广告规则配置文件。 diff --git a/src/debian/debian_dns_dnsmasq_cron.conf b/src/debian/debian_dns_dnsmasq_cron.conf index 48da96c..222f177 100644 --- a/src/debian/debian_dns_dnsmasq_cron.conf +++ b/src/debian/debian_dns_dnsmasq_cron.conf @@ -1,9 +1,15 @@ -## 下载 dnsmasq 插件安装脚本 +## 下载加速规则安装脚本 $ sudo curl -LR -o /opt/dnsmasq_plugin.sh https://gitee.com/felixonmars/dnsmasq-china-list/raw/master/install.sh -## 设置安装脚本权限 +## 设置脚本可执行权限 $ sudo chmod +x /opt/dnsmasq_plugin.sh +## 设置脚本文件防篡改 +$ sudo chattr +i /opt/dnsmasq_plugin.sh + +## 执行脚本 +$ sudo bash /opt/dnsmasq_plugin.sh + ## 设置 crontab 20 6 * * * /usr/bin/curl --retry-connrefused --retry 5 --retry-delay 5 --retry-max-time 60 -fsSLR -o /etc/smartdns.d/anti-ad.smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf