mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 14:02:53 +08:00
更新文档
This commit is contained in:
@@ -411,3 +411,41 @@ $ sudo nvim /etc/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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user