ufw status inactive
If you see the message “ufw status inactive” on Ubuntu 22, it means that the Uncomplicated Firewall (ufw) is currently not running on your system. This could be because the firewall has not been enabled or because it has been disabled.
To check if ufw is installed on your system, you can run the following command in your terminal:
sudo ufw status
If the output of the command is “command not found“, it means that ufw is not installed on your system. You can install it using the following command:
sudo apt install ufw
If the output of the command is “inactive“, it means that ufw is installed but it is currently not running. You can enable it using the following command:
sudo ufw enable
After enabling ufw, you can check its status again using the “sudo ufw status” command to confirm that it is running and protecting your system.
Note– Once the UFW is enabled, this settings should persists after system reboots.