diff --git a/07.PVE制作TS服务器.md b/07.PVE制作TS服务器.md index 57383f9..c08c804 100644 --- a/07.PVE制作TS服务器.md +++ b/07.PVE制作TS服务器.md @@ -410,4 +410,42 @@ $ sudo mv /etc/nftables.conf /etc/nftables.conf.bak $ sudo nvim /etc/nftables.conf ``` -由于防火墙配置文件很长,因此请查阅文件 [debian_ts_nftables.conf](./src/debian/debian_ts_nftables.conf) 进行复制。 \ No newline at end of file +由于防火墙配置文件很长,因此请查阅文件 [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 +```