Does Ubuntu 24.04 use iptables or nftables?

Hello everyone,

When enabling UFW, I noticed firewall rules are added to both iptables and nftables. This has me a bit confused. When configuring a firewall with UFW, which one does Ubuntu actually use?

2 Likes

HI @ivansalloum
UFW primarily uses iptables on the backend on Ubuntu. However, recent versions support nftables as well. You can check which backend is active by looking at the rules with sudo iptables -L for iptables or sudo nft list ruleset for nftables.

1 Like