From ed3c106e27658675c3d14e7c952cd5196917514c Mon Sep 17 00:00:00 2001 From: CallMeR <9463297+callmer@user.noreply.gitee.com> Date: Mon, 1 Jan 2024 13:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 07.PVE制作TS服务器.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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