Uncomplicated Firewall (UFW) is the standard firewall configuration program in Ubuntu. It is a command line program. Most users will prefer to use Gufw, which is a graphical program to configure UFW.
Advanced users may wish to use UFW directly in the terminal. See the UFW manual or the Community Documentation page on UFW for more information. Alternatively, you can use iptables – see the iptables manual.
To install and enable Gufw:
- Install the gufw package.
- To start Gufw, choose System → Administration → Firewall configuration.
- To enable the firewall, simply check the box next to Enabled under “Actual Status.”
The default configuration is to deny connections. This means that a program attempting to connect to your computer will be denied. Certain programs or services which use the internet may require you to add an exception.
To add an exception:
- Click Add.
- You can choose from Preconfigured options for common programs and services, or you can manually add port exceptions in the Simple or Advanced tabs.
- To find out what type of exception a particular program requires, you should consult the help for that program.