My Computer Tips

My Computer tips has over 290 tutorials and tips.

Valid CSS!

Categories

How to enable the ufw firewall in Linux Mint, Ubuntu and Ubuntu based distributions

ID: 65

Category: Ubuntu

Added: 26th of December 2015

Updated On: Tutorial updated and rechecked on 16th of July 2025

Views: 5,145

Related Tips & Tutorials

KeepassXC, Safe and secure way of storing your login information and passwords

ufw uncomplicated Firewall is the default Firewall in Linux Mint, Ubuntu and Ubuntu based distributions. It also included in many other Linux distributions.

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 user-friendly GUI (gufw). It can be accessed by entering the following command in the terminal or from the main menu in your Linux distribution.
sudo gufw

If gufw is not installed in your distribution, enter the following command below
sudo apt install gufw


gufw graphical user interface for ufw

The default settings should be fine for the average home user.