nftables
nftables is the successor to iptables, ip6tables, arptables, and ebtables — replacing four separate tools with a single framework. It was merged into the Linux kernel in 3.13 (2014) and became the default firewall backend in Debian 10 (Buster, 2019) and Ubuntu 20.10.
The transition from iptables to nftables is largely transparent when using UFW — UFW abstracts both backends. Problems arise when iptables rules are mixed with nftables rules, or when Docker (which uses iptables directly) is running on a system using nftables.
nftables vs iptables
iptables uses separate tables (filter, nat, mangle) with separate commands. nftables uses a single nft command with a unified syntax. nftables supports sets (groups of addresses or ports) natively, reducing rule count. nftables has better performance at high rule counts due to kernel-level set operations.
Docker and nftables Conflict
Docker uses iptables compatibility mode on nftables systems. This can cause the DOCKER chain in iptables to not interact correctly with nftables rules, leading to UFW-like bypass issues where containers appear protected but are actually accessible. The fix involves explicitly configuring Docker to use the nftables-compatible iptables backend.
Related Tools
Fix Guides
Frequently Asked Questions
sudo nft list ruleset. If it returns rules, nftables is active. Run sudo iptables -L — on nftables systems this uses the iptables-nft compatibility layer. Check dpkg -l nftables iptables to see which packages are installed.ufw allow/deny are translated to nftables rules. However, Docker's iptables rules may not integrate correctly — see the Docker UFW bypass glossary entry.