How to Install and Use Gufw Firewall on Ubuntu Desktop

Setting up iptables firewall can be difficult for Linux beginners. Ubuntu has made it a little bit easier. UFW, aka uncomplicated firewall, is the front end for iptables.  Gufw on the other hand, is the graphical front end for UFW and it’s one of the easiest firewalls in the world.

Should You Use Gufw on Your Computer?

  • If your computer connects to the Internet through a broadband router that includes a built-in firewall, then you don’t need another firewall running on your computer.
  • If however, you do not have a router in your home and your computer connects to the Internet through a DSL modem or cable modem, then installing and configuring Gufw on your computer is a good choice.
  • In public places like offices, hotels, or restaurants where your computer is hooked up to public Wi-fi, your computer is more likely to be attacked by malicious hackers. You definitely want to enable Gufw on your computer.

How to Install and Use Gufw on Ubuntu

To install Gufw, just open up a terminal window and issue the following command.

sudo apt-get install gufw

Now we can launch gufw in Unity Dash.

Getting Started with Gufw on Ubuntu 16.04 Desktop

By default, you have 3 different profiles: public, office and home.

Getting Started with Gufw on Ubuntu 16.04 Desktop

The most basic setup for a home computer is denying all incoming traffic and allowing all outgoing traffic. You will be able to surf the Internet. To achieve this, you just need to switch status from off to on.

gufw - graphical uncomplicated firewall

To add your own firewall rules, click on the Rules tab then click on the plus sign. (You need to switch status on in order to add your own rules).

gufw add rules

You can add firewall rule for a specific application such as 0 A.D. or a protocol such as SSH.

gufw add a firewall rule

Let’s say you want to disable SSH login on your Ubuntu desktop, i.e. you don’t allow other computers to SSH into your Ubuntu machine but at the same time you want to SSH into other computers from your Ubuntu desktop, all you need to do is set the policy to Deny, select In as the direction, select Network in category, select Services in subcategory, select SSH in application and click the Add button.

gufw deny incoming SSH trafficYou will see a new firewall in the Rules tab.

Getting Started with gufw on Ubuntu 16.04 DesktopIf you like to play with the command line, here’s the command to check ufw status.

sudo ufw status

sudo ufw status gufw

To enable Gufw on system startup, enter this command:

sudo ufw enable

enable gufw on system startup

What’s the Difference Between Deny and Reject?

You will see 4 policies in Gufw: allow, deny, reject and limit.

  • Allow is to accept packets to traverse the firewall.
  • Deny will deny traffic.
  • Reject policy will deny traffic and will send a packet to the source computer to let it know traffic has been rejected.
  • Limit policy will deny traffic if an IP tried several connections.

To add more profiles, go to edit > preferences and click the plus button.

gufw

Rate this tutorial
[Total: 14 Average: 4.1]

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here