This article was updated and rechecked on 6th of April 2024
Enable ufw, uncomplicated firewall in Ubuntu and Ubuntu based distributions
ufw uncomplicated Firewall is the default Firewall in Ubuntu and Ubuntu based distributions. It also included in Linux Mint and many other Linux distributions.
You may find that ufw is not enabled by default when you start your distribution, so you need to enable it via the terminal.
To check the status of ufw enter the following in the terminal
sudo ufw status
To enable ufw, open your terminal and enter the following command
sudo ufw enable
The following message will be displayed in terminal Firewall is active and enabled on system startup
If you want a detailed information about the status of ufw via the terminal enter the following command
sudo ufw status verbose
Which results in the following output:
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
If you prefer not to use the terminal to access your firewall, ufw (Uncomplicated Firewall) has a GUI, it can be accessed by entering the following command in the terminal
sudo gufw
The default settings should be fine for the average home user.
If you find gufw is not installed, you can install it by entering the following command