How to setup Firewall using GUFW in Ubuntu 16.04.
To setup Firewall using GUFW in Ubuntu 16.0
Setting up iptables firewall can be difficult for Linux beginners. Ubuntu has made it a little bit easier. GUFW, 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. It is so simple to setup firewall using GUFW in Ubuntu 16.0
Setting Up Firewall
To install Gufw, just open up a terminal and run the following command.
root@linuxhelp:~# apt-get install gufw
Reading package lists... Done
Building dependency tree
.
Setting up gufw (16.04.1-0ubuntu1.1) ...
Now you can launch gufw in Unity Dash. By default, you have 3 different profiles: public, office and home. Here Home is chosen.
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.
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).
You can add firewall rule for a specific application such as 0 A.D. or a protocol such as SSH.
Let’ s say you want to disable SSH login on your Ubuntu 16.04 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 another computer from you Ubuntu 16.04 desktop, all you need to do is set policy to Deny, select In as the direction, select Network in category, select Services in subcategory, selectSSH in application and click the Add button.

You will see a new firewall in the Rules tab.
If you like to play with the command line, here’ s the command to check ufw status.
root@linuxhelp:~# ufw status
Status: active
To Action From
-- ------ ----
22/tcp DENY Anywhere
22/tcp (v6) DENY Anywhere (v6)
To enable Gufw on system startup, enter this command.
root@linuxhelp:~# ufw enable
Firewall is active and enabled on system startup.
Overall, UFW is able to protect your VPS against the most common hacking attempts. Of course, your security measures should be more detailed than just using UFW. However, it is a good (and necessary) start.
Comments ( 0 )
No comments available