Firewall – ufw status inactive on Ubuntu 20.04 Focal Fossa Linux

The objective of this tutorial is to activate the UFW firewall on Ubuntu 20.04 Focal Fossa Linux.

In this tutorial you will learn:

  • How to check UFW status
  • How to activate UFW

How to activate an inactive UFW on Ubuntu 20.04

How to activate an inactive UFW on Ubuntu 20.04

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa
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 20.04 step by step instructions

  1. First, check your current UFW status:
    $ sudo ufw status
    Status: inactive
    


  2. Activate UFW:
    $ sudo ufw enable
    Firewall is active and enabled on system startup
    
  3. (optional) Check UFW status:
    $ sudo ufw status
    Status: active
    

    Once the UFW is enabled, this settings should persists after system reboots.