ubuntu,

How to Install ufw on Ubuntu 22.04

Jan 06, 2023 · 1 min read · Post a comment

Usually, Ubuntu comes with a pre-installed ufw firewall. But in some cases like using the Ubuntu docker image or Ubuntu server-based images can be an exception and you might see that there is no firewall installed. That’s why today I will show you how to install ufw on Ubuntu 22.04.

Prerequisites

  • Ubuntu 22.04
  • sudo privileges

Install ufw on Ubuntu 22.04

Step 1. Update the apt packages.

sudo apt update

Step 2. Install ufw.

sudo apt install ufw

Step 3. Verify the installation.

sudo ufw status

Step 4. If it’s not activated you can activate it by running the following command.

sudo ufw enable

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.