Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

nftables

Direct answer

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.

When to use this

Use it when configuring, checking or troubleshooting nftables in Linux Security.

First 30 seconds

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.

Operational verification

packet → hook → chain rules → verdict

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

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.

Platform / version applicability
Platform and workload security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformPlatform and workload security
Scope / prerequisiteUse it when configuring, checking or troubleshooting nftables in Linux Security.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • 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.
Key checks
  • nft list ruleset — rules
  • nft -c -f /etc/nftables.conf — check config
  • systemctl 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docPlatform and workload security current

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%
Terminology layer

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.

Aliases that resolve here
nft firewallNetfilter nftablesLinux modern firewall
Embedded reference data

Quick lookup tables

Linux Security → nftables proof map

Fast scope, effective-state, runtime-evidence and closure boundaries for Linux Security → nftables.

BoundaryEstablishDoes not establish
ScopeExact host, role, build/kernel, identity, workload and expected controlDoes not prove policy receipt or effective runtime state
Effective stateResultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controlsConfiguration presence does not prove enforcement
Runtime evidenceCorrelated events/audit, process/token/credential, packet/syscall and workload resultOne event, clean status or allow/deny does not prove complete security
ClosureOriginal allowed/denied workload works, unsafe state is removed and recovery/regression passCommit, restart, block or compliance result alone is not closure
Confirmation

Confirm action

Continue?