Use it when configuring, checking or troubleshooting nftables in Linux Security.
nftables
nftables is the modern Netfilter packet-classification framework using tables, chains, hooks, priorities, rules, sets/maps, state, NAT and atomic ruleset updates across address families.
1. nftables is the modern Linux firewall framework.
2. Tables/chains/rules with sets and maps.
3. Default policy drop on input.
4. Atomic rule replacement.
5. Persist in /etc/nftables.conf.
packet → hook → chain rules → verdict
Context & applicabilityCommon mistakes · platform/version boundaries
An nftables counter/verdict shows a packet matched one live rule, but it does not show delivery, return traffic or persistent reload configuration.
Suspicious evidence: config differs from live ruleset, wrong namespace/family/hook, shadowed rule, set stale, default policy surprise, mixed manager flush, IPv6 gap or counter from unrelated traffic.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
packet and namespace → Netfilter hook/priority → table/base chain → ordered rules/sets/jumps → conntrack/NAT/verdict → socket/forwarding → counter/log
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- nftables service active ≠ intended kernel ruleset loaded.
- Rule listed ≠ packet reaches its hook/chain or matches it.
- Configuration file present ≠ parsed, loaded and effective runtime state.
- One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.
nft list ruleset— rulesnft -c -f /etc/nftables.conf— check configsystemctl status nftables— service
ReferenceWhat it is1 section · depth on demand
Basic ruleset
table inet filter {
chain input {
type filter hook input priority 0; policy drop;
ct state established,related accept
iif lo accept
ip saddr 10.99.0.0/24 tcp dport 22 accept
tcp dport { 80, 443 } accept
icmp type echo-request limit rate 5/second accept
}
}
Documented example, not captured output. Load with nft -f /etc/nftables.conf, list with nft list ruleset, persist with systemctl enable nftables. One inet table covers IPv4 and IPv6.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
An nftables counter/verdict shows a packet matched one live rule, but it does not show delivery, return traffic or persistent reload configuration.
In depth
nftables is the current Linux packet filtering framework, replacing iptables with a single tool (nft), better performance and atomic rule updates. firewalld and ufw can use it as a back end.
# /etc/nftables.conf
table inet filter {
chain input {
type filter hook input priority 0; policy drop;
ct state established,related accept
iif lo accept
ip saddr 10.0.10.0/24 tcp dport 22 accept
tcp dport { 80, 443 } accept
icmp type echo-request limit rate 5/second accept
meta l4proto ipv6-icmp accept
}
}
nft -c -f /etc/nftables.conf # check syntax
nft -f /etc/nftables.conf
nft list ruleset
Use the inet family to cover IPv4 and IPv6 together, and always allow ICMPv6 needed for neighbour discovery.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Security → nftables. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/security/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Linux Security → nftables proof map
Fast scope, effective-state, runtime-evidence and closure boundaries for Linux Security → nftables.
| Boundary | Establish | Does not establish |
|---|---|---|
| Scope | Exact host, role, build/kernel, identity, workload and expected control | Does not prove policy receipt or effective runtime state |
| Effective state | Resultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controls | Configuration presence does not prove enforcement |
| Runtime evidence | Correlated events/audit, process/token/credential, packet/syscall and workload result | One event, clean status or allow/deny does not prove complete security |
| Closure | Original allowed/denied workload works, unsafe state is removed and recovery/regression pass | Commit, restart, block or compliance result alone is not closure |