Move to Linux
Browse guides

Linux Mint

Firewall

Turn on Linux Mint's firewall from the Welcome screen or terminal.

What does a firewall do?

A firewall controls network connections to and from your computer. It can block unwanted incoming connections while letting you browse, download, and use your apps.

Linux Mint includes UFW, short for Uncomplicated Firewall. It’s disabled by default.

Turn it on from the Welcome screen

Open Welcome, go to First Steps, and launch Firewall. This opens Gufw, the firewall app already included with Mint.

Switch Status on. Keep Incoming set to Deny and Outgoing set to Allow for a basic desktop setup.

You can also open Firewall Configuration from the app menu.

Gufw showing the firewall switched on, incoming connections set to Deny, and outgoing connections set to Allow.
Source: Wikipedia (Gufw) (opens in a new tab)

Check if it’s on

Open a terminal and run:

sh
sudo ufw status

Active means UFW is on. Inactive means it’s off.

Prefer the terminal?

On your own desktop, run:

sh
sudo ufw enable

Confirm if prompted. This also enables UFW when your computer starts, so you don’t need to repeat it after restarting.

With its default rules, UFW blocks incoming connections you haven’t allowed and permits outgoing connections. Normal browsing and downloads should still work.

Run sudo ufw status again to check that it says active.

What if an app needs a connection?

File sharing, remote access, or hosting a game may need an extra rule to let other devices connect. Follow the app’s instructions and allow only what it needs.

Ubuntu’s firewall guide (opens in a new tab)

Last updated