更新文档

This commit is contained in:
CallMeR
2024-01-01 13:13:36 +08:00
parent ed3c106e27
commit 0a9a2ee8fe
+39 -1
View File
@@ -410,4 +410,42 @@ $ sudo mv /etc/nftables.conf /etc/nftables.conf.bak
$ sudo nvim /etc/nftables.conf $ sudo nvim /etc/nftables.conf
``` ```
由于防火墙配置文件很长,因此请查阅文件 [debian_ts_nftables.conf](./src/debian/debian_ts_nftables.conf) 进行复制。 由于防火墙配置文件很长,因此请查阅文件 [debian_ts_nftables.conf](./src/debian/debian_ts_nftables.conf) 进行复制。
### 1.9.调整系统端口
为了正常使用 `53` 端口,需要对 `systemd-resolved.service` 进行配置,执行以下命令。
```bash
## 创建 systemd-resolved 配置文件夹
$ sudo mkdir -p /etc/systemd/resolved.conf.d
## 创建 systemd-resolved 配置文件
$ sudo nvim /etc/systemd/resolved.conf.d/server_dns.conf
```
在配置文件中添加以下配置项,并保存。
```bash
## systemd-resolved 配置项
[Resolve]
DNS=127.0.0.1
DNS=::1
DNSStubListener=no
```
保存该配置文件后,还需调整系统 `resolv.conf` 配置文件,执行以下命令。
```bash
## 创建 resolv.conf 软链接
$ sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
```
配置完成后,需重启 `systemd-resolved.service` 服务。
```bash
## 重启 systemd-resolved.service
$ sudo systemctl restart systemd-resolved.service
```