Table of Contents
GUFW is a desktop interface for Ubuntu’s Uncomplicated Firewall (UFW). A common starting point for a desktop is to deny incoming connections and allow outgoing connections. Add exceptions only for services you use. If you’re administering the machine remotely, confirm that your existing access is allowed before enabling the firewall.
Install GUFW from Ubuntu’s repositories
In a terminal, refresh the package index and install GUFW. If Ubuntu can’t find it, check that the Universe repository is enabled for your release.
sudo apt update
sudo apt install gufw
Install through the software app
If your software app lists Ubuntu repository packages, search for GUFW or Firewall Configuration, then install it.
Check the defaults and enable the firewall
Open Firewall Configuration from the app menu and authenticate if prompted. Review the current incoming and outgoing policies and any existing rules. Enable the Status switch after you’ve confirmed that the connections you need will still be allowed.
Use profiles for different rule sets
GUFW profiles let you store different policies. Check the settings in each profile before activating it. A name like Home or Office does not indicate which traffic will be allowed on your system.
Use Edit → Preferences to add, rename, or remove a custom profile. Review the selected profile before making changes.
Add and edit only the rules you need
In Rules, select +. Use Preconfigured for a listed service, Simple for a specific port, or Advanced to restrict the source address, network, or interface. For a service that only your local network should reach, restrict the rule to that network if you know its subnet.
Allow permits matching traffic. Deny drops it, while Reject sends a rejection response. Limit rate-limits new connections for supported rules.
Select an existing rule and use its settings or edit control to adjust it. Review what the rule permits before saving.
Verify the resulting configuration
sudo ufw status verbose
Check that UFW is active and that the listed rules match what you intended. Test an allowed service from an authorized device. See Ubuntu’s firewall documentation for how UFW fits into the system.
Reader Comments 0
Sign in with email or Google to join the discussion.