UFW vs nftables: port baseline, egress and IP lists
UFW and nftables compared on licence, rule format and role, with each claim sourced to project pages and to how Jabali Panel uses each one.
Started as a Novell NetWare network administrator 35 years ago; system administrator and web developer for more than 25 years.
UFW and nftables both manage a Linux firewall. They work at different levels. UFW is a front end that writes rules in the iptables-restore format [4]. nftables is the netfilter framework and its nft command. This post compares the two on licence, rule format and role. It also shows how Jabali Panel uses each one. It does not rank them.
Read this as a comparison by an interested party. Jabali Panel uses UFW for its port baseline. It uses nftables for per-user egress and for an IP-list table. IP bans are decided in CrowdSec, and the CrowdSec nftables firewall bouncer enforces them. We checked each product claim against that project’s own pages, fetched on 2026-11-23 (UTC). We checked Jabali’s claims against its public docs on the same day. Where we make a judgement, we label it as ours.
The short answer
Choose UFW for a short list of static port rules that you want to read at a glance. This is our judgement.
Choose nftables when you need sets, maps, or rules that match on a cgroup. This is our judgement.
These two lines are ours. They are not a ranking.
Licence
UFW is under the GNU General Public License, version 3. Its Launchpad page gives the licence as GNU GPL v3 [2]. Its COPYING file begins “Version 3, 29 June 2007” [3].
For nftables, we checked the netfilter.org licensing page [6]. It states the licence for netfilter and iptables as GPLv2 only. It does not name nftables. For this post we did not check the nftables licence.
Our reading: both tools are free software. The licence versions may differ, so read the terms before you ship either one inside a product.
What each one is
UFW describes itself as a “program for managing a netfilter firewall” [1]. Its man page says that it “aims to provide an easy to use interface for the user” [1].
UFW’s framework page says that UFW “is in part a front-end for iptables-restore” [4]. It also says that UFW “loads its rules files into the kernel by using the iptables-restore and ip6tables-restore commands” [4].
Our reading: UFW writes its rules in iptables-restore format. The pages we fetched do not name the kernel backend that runs those rules. We did not confirm which backend Debian 13 uses under UFW.
The netfilter.org project page says that “nftables replaces the popular” iptables family of tools [5]. It adds that “there is a backward compatibility layer that allows you run iptables/ip6tables” over the nftables infrastructure [5].
The nft man page says that interval sets “must be able to store intervals” [7]. It also documents a socket match on the cgroupv2 “at a given ancestor level” [7]. The nftables wiki describes a verdict map this way: “Verdict maps, created using the vmap statement, allow you to map elements directly to verdict statements.” [8]
Our reading: nftables is the framework, and nft is its command. Sets, maps and verdict maps are part of the framework. The wiki also describes moving “from the old iptables/xtables (legacy) world to the new nftables framework” [9].
How Jabali Panel uses UFW
Jabali’s UFW page says that “UFW has only this role” [11]. The role is the port baseline. The page lists web, mail, DNS, the panel on port 8443 and ManageSieve on 4190 [11]. It opens port 22 only on first install [11]. It denies incoming connections by default and allows outgoing ones [11].
Jabali’s docs say that UFW is a poor fit for many short-lived, per-IP block decisions. CrowdSec makes those decisions instead [11]. We agree with that split, and it is our judgement that a static port list suits UFW.
How Jabali Panel uses CrowdSec and nftables
Jabali’s security page says that “CrowdSec is the only thing that decides whether an IP gets blocked.” [12] The nftables firewall bouncer “drops banned IPs on every port” [12], so mail and SSH are covered too.
Jabali also keeps IP lists in its own nftables table. Its firewall page says that the agent “loads them into its own nftables table” [10]. The table holds public lists such as FireHOL and IPsum, and each entry bans “whole networks included, on every port” [10]. The docs give the command nft list table inet jabali_lists to see the table [10].
Our reading: these lists need network-level entries, which fits the nft interval-set model in [7]. The docs do not say why nftables was chosen over UFW for this, so we do not claim a reason.
How Jabali Panel uses nftables for egress
Jabali’s egress page says that “Restricting outbound at the per-user cgroup level bounds the damage even when the host application is owned.” [13] The security page says that “the nftables ruleset matches by cgroup ID” [12].
The egress page lists the default. Each user’s chain allows loopback, DNS, HTTP and HTTPS, and the mail ports, “to any destination” [13]. Everything else “is dropped for an enforced user” [13]. A learning user’s other traffic is allowed but logged [13]. The page also describes a vmap that maps each user’s cgroup to a chain [13].
The egress page says that the egress firewall “does not interpose between the user and inbound traffic” [13]. Inbound filtering stays with UFW and CrowdSec [13].
Our reading: the port baseline stays in UFW. Per-user outbound rules need a match on cgroups, so they sit in nftables. We take this split as ours. Jabali’s docs describe the same split [12][13].
Which one fits which job
These judgements are ours.
- A few static ports on one host, read at a glance: UFW.
- Address sets, maps, or rules that match on a cgroup: nftables.
- A panel that needs both: keep the roles separate, as Jabali Panel does.
Common questions
Does UFW run on nftables?
The UFW pages we fetched name iptables-restore [4]. They do not name the kernel backend. We did not confirm the backend on Debian 13.
Can I block an IP with ufw deny from?
Jabali’s docs say no. The UFW page says: “for IP-blocking always use cscli instead of ufw deny from.” [11]
Is nftables licensed under the GPL?
The netfilter.org licensing page covers netfilter and iptables [6]. We did not check the licence of nftables itself, so we make no claim about it.
Read next
- CrowdSec vs Fail2ban: detection, bans and bouncers: how CrowdSec decides and how its bouncers enforce.
- FireHOL, IPsum and custom IP blocklists on top of CrowdSec: the lists that land in the nftables table.
- Jabali Panel firewall: the division of labour between UFW and CrowdSec.
Sources and check dates
All sources were fetched on 2026-11-23 (UTC).
- UFW man page, Debian trixie: https://manpages.debian.org/trixie/ufw/ufw.8.en.html
- UFW project page, Launchpad: https://launchpad.net/ufw
- UFW COPYING: https://git.launchpad.net/ufw/plain/COPYING
- UFW framework man page, Debian trixie: https://manpages.debian.org/trixie/ufw/ufw-framework.8.en.html
- netfilter.org, nftables project page: https://www.netfilter.org/projects/nftables/index.html
- netfilter.org, licensing: https://www.netfilter.org/licensing.html
- nft man page, Debian trixie: https://manpages.debian.org/trixie/nftables/nft.8.en.html
- nftables wiki, verdict maps: https://wiki.nftables.org/wiki-nftables/index.php/Verdict_Maps_(vmaps)
- nftables wiki, moving from iptables: https://wiki.nftables.org/wiki-nftables/index.php/Moving_from_iptables_to_nftables
- Jabali Panel, firewall: https://jabali-panel.com/docs/firewall/
- Jabali Panel, UFW baseline: https://jabali-panel.com/docs/admin/ufw-baseline/
- Jabali Panel, security: https://jabali-panel.com/docs/security/
- Jabali Panel, egress firewall: https://jabali-panel.com/docs/admin/egress/