diff --git a/07.PVE制作TS服务器.md b/07.PVE制作TS服务器.md index 0113664..57383f9 100644 --- a/07.PVE制作TS服务器.md +++ b/07.PVE制作TS服务器.md @@ -388,3 +388,26 @@ $ sudo systemctl restart apt-daily-upgrade.timer $ sudo systemctl status apt-daily-upgrade.timer ``` +### 1.8.配置防火墙 + +修改防火墙配置之前,需检查 `nftables.service` 服务状态,确保该服务开机自启。 + +```bash +## 检查 nftables.service +$ sudo systemctl status nftables.service + +## 设置 nftables.service 开机自启 +$ sudo systemctl enable nftables.service +``` + +使用 `neovim` 编辑器修改 `nftables` 配置文件,执行以下命令。 + +```bash +## 备份 nftables 配置文件 +$ sudo mv /etc/nftables.conf /etc/nftables.conf.bak + +## 创建新的 nftables 配置文件 +$ sudo nvim /etc/nftables.conf +``` + +由于防火墙配置文件很长,因此请查阅文件 [debian_ts_nftables.conf](./src/debian/debian_ts_nftables.conf) 进行复制。 \ No newline at end of file