The default firewall on Ubuntu 22.04 Jammy Jellyfish is ufw, with is short for “uncomplicated firewall.” Ufw is a frontend for the typical Linux iptables commands, but it is developed in such a way that basic firewall tasks can be performed without the knowledge of iptables.
Ufw should already be installed on your Ubuntu 22.04 system, but if your firewall status says
inactive, that means ufw is turned off and currently not enforcing any rules. In this tutorial, you will see how to activate the UFW firewall on Ubuntu 22.04 Jammy Jellyfish.
In this tutorial you will learn:
- How to check UFW status
- How to activate UFW
|Category||Requirements, Conventions or Software Version Used|
|System||Ubuntu 22.04 Jammy Jellyfish|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
How to activate an inactive UFW on Ubuntu 22.04 step by step instructions
- The first thing we will do is open a command line terminal and check the current UFW status with the following command:
$ sudo ufw status Status: inactive
- Next we can activate UFW with this command:
$ sudo ufw enable Firewall is active and enabled on system startup
Once the UFW is enabled, this setting should persist after system reboots.
- Check the UFW status again at any time, and it should be
$ sudo ufw status Status: active
- Alternatively you can add the
verboseoption to your command in order to see more information about the ufw status and what rules it is currently enforcing:
$ sudo ufw status verbose
- In case you need to turn ufw off again at some point, just use the
$ sudo ufw disable Firewall stopped and disabled on system startup
In this tutorial, we saw how to enable the ufw firewall on Ubuntu 22.04 Jammy Jellyfish Linux. In the terms of ufw, it’s more like activating the previously inactive firewall. Did you know that you can also control the status of ufw from GUI? Check out our other tutorial on How to enable/disable firewall on Ubuntu 22.04 LTS Jammy Jellyfish Linux if you want to activate or deactivate the firewall from GUI.