sub:nftables

sub:nftables

Content #

nft <command> <subcommand> <chain> <rule definition>

Typical commands: add list delete insert flush Typical subcommands: table chain rule

Address families Hooks in inet families Table Syntax Chain Syntax Rule Syntax

Concepts #

Rejecting versus Denying a Packet Incoming TCP Connection State Filtering Stealth Scans(RST package) ping Flooding

0.0.0.0/0(nftables) Default Policy Rules and the First Matching Rule Wins 数据包不会“从外部接口返回”

type 决定了链能做什么​(操作类型)。 hook 决定了链何时做​(触发阶段)。 priority 决定了同一钩子点上多个链执行的顺序。​特定 type 仅适用于部分 hook: nat 类型通常用于 prerouting 和 postrouting 钩子。 filter 类型可用于 input、forward 和 output 钩子。​非法组合会报错:例如,在 input 钩子中使用 type nat 可能导致规则无法生效。

sub:iptables cook:nft