Time to read: about 2 minutes.
All websites, especially ecommerce sites, need to be secure. A properly set up firewall is an essential component for a secure server.
Ubuntu 22.04 uses the Uncomplicated Firewall
ufw firewall frontend by default.
Ufw has been provided for Ubuntu since v8.04 (Hardy Heron).
ufw as follows:
$ sudo ufw enable Firewall is active and enabled on system startup
ufw application profiles for
ssh and nginx (HTTP/HTTPS) like this:
$ sudo ufw allow OpenSSH Output Rule added Rule added (v6) $ sudo ufw allow 'Nginx Full' Output Rule added Rule added (v6)
The following is mostly true:
ufw, which is short for “uncomplicated firewall.”
Ufwis a frontend for the typical Linux
iptablescommands, but it is developed in such a way that basic firewall tasks can be performed without the knowledge of
ufwcan be managed from a graphical interface. In this tutorial, you will learn how to enable and disable the
ufwfirewall on Ubuntu 22.04 Jammy Jellyfish from both command line and GUI.
– How to enable/disable firewall on Ubuntu 22.04 LTS Jammy Jellyfish Linux
The above makes no mention of how Ubuntu 22.04 replaced
nftables, as described below.
nftables as the default firewall backendFirewalling on Linux consists of two components – the firewall mechanism within the Linux kernel, and the tools used to configure this from userspace. The Linux kernel has traditionally supported two different subsystems for firewall policies –
xtablesand the newer
Nftablesbrings significant benefits both in terms of performance and flexibility when creating and deploying firewall rules, particularly for dual stack IPv4/IPv6 systems.
iptablesuserspace management tool now configures the
nftableskernel backend, whilst the new
nftuserspace tool is also present to allow the creation of more flexible rules not supported by the traditional iptables paradigm.
– What’s new in Security for Ubuntu 22.04 LTS?
Digital Ocean has a good