mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 22:12:51 +08:00
更新 SmartDNS 配置
This commit is contained in:
+12
-12
@@ -65,9 +65,7 @@
|
||||
|
||||
## 4.调整系统端口
|
||||
|
||||
设置完成后,将该虚拟机开机,并使用 SSH 工具登录。
|
||||
|
||||
Adguard Home 需监听系统 `53` 端口来提供 DNS 服务,使用以下命令检查端口占用。
|
||||
设置完成后,将该虚拟机开机,使用 SSH 工具登录,并使用以下命令检查端口占用。
|
||||
|
||||
```bash
|
||||
## 检查 53 端口占用
|
||||
@@ -81,9 +79,9 @@ systemd-r 347 systemd-resolve 19u IPv4 13447 0t0 UDP localhost:domain
|
||||
systemd-r 347 systemd-resolve 20u IPv4 13448 0t0 TCP localhost:domain (LISTEN)
|
||||
```
|
||||
|
||||
当前系统 `53` 端口被 `systemd-resolved.service` 占用,会导致 Adguard Home 监听端口失败。
|
||||
当前系统 `53` 端口被 `systemd-resolved.service` 占用,会导致自建内网 DNS 服务时监听端口失败。
|
||||
|
||||
为了正常使用 Adguard Home ,需要对 `systemd-resolved.service` 进行配置,逐行执行以下命令。
|
||||
为了正常使用 `53` 端口,需要对 `systemd-resolved.service` 进行配置,逐行执行以下命令。
|
||||
|
||||
```bash
|
||||
## 创建 systemd-resolved 配置文件夹
|
||||
@@ -152,7 +150,11 @@ $ sudo snap set system refresh.timer=2:30-3:30,14:30-15:30
|
||||
$ sudo snap set system refresh.timer=mon,2:30,,fri,2:30
|
||||
```
|
||||
|
||||
### 5.2.定时任务
|
||||
### 5.2.配置 Adguard Home
|
||||
|
||||
关于 Adguard Home 配置相关内容,请参阅 [Adguard Home 折腾手记](https://gitee.com/callmer/agh_toss_notes) 。
|
||||
|
||||
### 5.3.定时任务
|
||||
|
||||
本步骤为可选操作,主要设置定时重启 Snap 服务。
|
||||
|
||||
@@ -173,20 +175,16 @@ $ sudo crontab -e
|
||||
|
||||
```
|
||||
|
||||
### 5.3.配置 Adguard Home
|
||||
|
||||
关于 Adguard Home 配置相关内容,请参阅 [Adguard Home 折腾手记](https://gitee.com/callmer/agh_toss_notes) 。
|
||||
|
||||
## 6. SmartDNS
|
||||
|
||||
若需使用 SmartDNS 代替 Adguard Home,可使用 Debian 官方源进行安装,但 SmartDNS 版本通常较为 “过时” 。
|
||||
若需使用 SmartDNS 代替 Adguard Home,可使用 Debian 官方源进行安装,但其版本通常较为 “过时” 。
|
||||
|
||||
```bash
|
||||
## 安装 SmartDNS
|
||||
$ sudo apt install smartdns
|
||||
```
|
||||
|
||||
因此,更推荐使用其 Github 仓库中最新的稳定版进行安装,官方仓库请参阅 [pymumu/smartdns](https://github.com/pymumu/smartdns/releases) 。
|
||||
因此,更推荐使用其 Github 仓库中的最新稳定版进行安装,官方仓库请参阅 [pymumu/smartdns](https://github.com/pymumu/smartdns/releases) 。
|
||||
|
||||
下载 SmartDNS 最新版本时,请根据系统架构选择对应版本,逐行执行以下命令。
|
||||
|
||||
@@ -215,6 +213,8 @@ $ sudo ./install -i
|
||||
|
||||
### 6.1.配置 SmartDNS
|
||||
|
||||
SmartDNS 配置较为复杂,可按需制定各类 DNS 请求规则,建议先查阅官方提供的 [配置指导](https://pymumu.github.io/smartdns/config/basic-config/) 和 [配置选项](https://pymumu.github.io/smartdns/configuration/) 。
|
||||
|
||||
若需使用 SmartDNS 的广告过滤功能,则需下载其广告过滤配置文件,为可选操作。
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user