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?
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?
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.
The thing is, upon activating UFW, rules get added to both firewalls. I don’t know what UFW is actually using.
Seems it can be confusing. I’ve been reading that as well.
A similar discussion also found here: How to confirm that nftables is enabled & in use?