Debian Nftables 更新规则的方法如下:
sudo apt update sudo apt install nftables my_rules.nft 的文件:sudo nano my_rules.nft table ip filter { chain input { type filter hook input priority 0; # 其他规则... } chain forward { type filter hook forward priority 0; # 其他规则... } chain output { type filter hook output priority 0; # 其他规则... } } 保存并关闭文件。
将新创建的规则集文件链接到 /etc/nftables.conf 文件:
sudo ln -s /path/to/my_rules.nft /etc/nftables.conf 请将 /path/to/ 替换为您保存 my_rules.nft 文件的实际路径。
sudo systemctl restart nftables 现在,您已成功更新了 Debian Nftables 规则。请根据您的需求自定义规则。