来自https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains
注意:如果一个数据包被接受并且在同一个钩子中有另一个以更高优先级排序的基本链,则将再次评估该数据包。也就是说,数据包将遍历给定钩子中的链,直到它被丢弃或不再存在基本链。Drops 立即生效,不再评估规则或链。
此行为的示例规则集:
table inet filter {
# this chain is evaluated first due to priority
chain ssh {
type filter hook input priority 0; policy accept;
# ssh packet accepted
tcp dport ssh accept
}
# this chain is evaluated last due to priority
chain input {
type filter hook input priority 1; policy drop;
# the same ssh packet is dropped here by means of default policy
}
问题是我怎样才能让 ssh 数据包被接受并仍然使用具有相同钩子(和不同优先级)的多个基本链?
我试图添加一个非基础链,它接受并使用跳转或转到该基础链。两者似乎都不起作用。恐怕我错过了线索。