cybersecuritysecurity
nftables
nftablessecurityfirewall
Plain English
nftables is the firewall engine inside the Linux kernel. Tools like UFW and Docker write rules into it; nft lets you see or write them directly.
Technical Definition
nftables organises rules into tables, chains (hooked at input, forward, output, prerouting, postrouting) and rules.
- sudo nft list ruleset shows everything.
- iptables on Ubuntu is iptables-nft, which translates into nftables.
- Supports sets and maps for fast matching.
Source: nft(8)
nftables in practice
$ sudo nft list ruleset | head
$ sudo iptables -V
iptables v1.8.11 (nf_tables)In the Wild
You rarely write nft by hand on Ubuntu, but listing the ruleset explains why traffic passes or drops when ufw and Docker both add rules.