Firewall – ufw status inactive on Ubuntu 22.04 Jammy Jellyfish Linux

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
How to activate an inactive UFW on Ubuntu 22.04
How to activate an inactive UFW on Ubuntu 22.04
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software ufw
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – 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



  1. 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
    
  2. 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.

  3. Check the UFW status again at any time, and it should be active.
    $ sudo ufw status
    Status: active
    
  4. Alternatively you can add the verbose option to your command in order to see more information about the ufw status and what rules it is currently enforcing:
    $ sudo ufw status verbose
    
  5. In case you need to turn ufw off again at some point, just use the ufw disable command.
    $ sudo ufw disable
    Firewall stopped and disabled on system startup
    

Closing Thoughts




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.