Ubuntu
Firewall
Check and enable Ubuntu's UFW firewall with a few simple commands.
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.
Ubuntu and Pop!_OS include UFW, short for Uncomplicated Firewall. It’s disabled by default.
Check if it’s on
Open a terminal and run:
sudo ufw statusActive means UFW is on. Inactive means it’s off.
Turn it on
On your own desktop, run:
sudo ufw enableConfirm 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.
Prefer an app? Use Gufw
Gufw lets you manage UFW with buttons and menus. Install it with:
sudo apt install gufwOpen Firewall Configuration from the app menu and switch Status on. Keep Incoming set to Deny and Outgoing set to Allow for a basic desktop setup.

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)