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 規則。請根據您的需求自定義規則。