UFW stands for Uncomplicated Firewall is a firewall to secure Linux desktop from harmful incoming and outgoing connections. UFW is the easiest firewall in Linux, it has a graphical user interface GUFW with all the features of setting up rules. In this tutorial we will install UFW & GUFW in our Ubuntu/Linux Mint/Debian operating system.
What Is Firewall ?
When you google what is firewall, you get a wikipedia page that tells about firewall. According to Wikipedia firewall is -
In computing, a firewall is a
Many hardware-based firewalls also offer other functionality to the internal network they protect, such as acting as a DHCP server for that network.
Firewall simply acts as a protection in between a computer and network.
Why To Install Firewall ?
Computers are connected to each other and they share data and some personal information with servers. The same way servers are connected with computers and they do share data depending on the request from client computer. But among those millions of connections there are dangerous connections too that steal private data from servers or desktop.
So to recognize and prevent such harmful and dangerous connections we use firewall. We can configure rules manually about the connections or there are also default set up rules in the firewall that stop certain connections to interact with system through network.
How To Install UFW (Uncomplicated Firewall) In Linux ?
In Ubuntu UFW is by default installed but if you doubt then you can check it by the following command -
$ sudo dpkg --get-selections | grep ufw
Is firewall installed? If not, you can install it from terminal.
$ sudo apt-get install ufw
Once you have installed ufw you can configure this firewall from the terminal. But ufw is known for its simplicity and ease of use. So we will use graphical user interface GUFW instead of terminal. Yeah!
So open up software manager and search for 'gufw' and install it -
Here you have installed graphical user interface and just open it up system settings, start menu or dash.
I am using Ubuntu so I'll start firewall from dash.
Connection settings - GUFW allows to change default profile Incoming and Outgoing connections settings.
Now move down side of the application. Here we have some very simple firewall customization tools.
Add a Firewall Rule - Select any service or application and click 'plus' sign and it will open window that is in left. The window has three tabs 'Preconfigured' , 'Simple' and 'Advanced'.
Preconfigured - Here you have preconfigured settings for applications.
Simple - Here you can select specify some very simple rules, like rule name, Policy, Direction, Protocol and Port.
Advanced - In addition to some simple settings in advanced tab you can set some other rule settings. For example, Insers, Interface, you can also set whether you want to make log, log all or do not log. Advanced tab has one more option to setup range of IP address for a selected application.
After you have setting up rules click Add. Rules added! You can see your added rules under Rules.
You can edit the rules and delete the rules. To edit any rule select it and click the setting icono below the list.
To delete any rule select rule and click 'minus'.
Learn How To Create a Hacking / Penetration Testing Lab Join Course
Most Read This Week