Configure Ubuntu desktop firewall

I already show you how to disable or enable Ubuntu desktop firewall. Just in case you don`t remember, Linux firewall is called iptables and you can configure it in some text editor, or to use graphical environment if you are not familiar with this method of editing. I show you how to do it in graphical environment.

First, let me be clear, you need to be root, or administrator on your PC in order to configure firewall. This configuration will affect all PC users. For this tutorial I created one administrator user and one simple user (Slide 1).

Configure Ubuntu desktop firewall

Slide 1.

My idea is to create firewall rule in which I will deny access to yahoo.com using https protocol. Because of this I resolved yahoo.com with nslookup (Slide 2.).

Configure Ubuntu desktop firewall

Slide 2.

As you can see one of IP addresses in which I resolved yahoo.com is 206.190.36.45. Now I started browser and I typed https://206.190.36.45 and I received page (Slide 3).

Configure Ubuntu desktop firewall

Slide 3.

Now, go to Start and type firewall and select Firewall Configuration  (Slide 4).

Configure Ubuntu desktop firewall

Slide 4.

In order to start creating rule select plus under Rules section. In order to view log and listening ports expand sections (Slide 5)

Configure Ubuntu desktop firewall

Slide 5.

Under Add a Firewall Rule type Name. Insert leave by default and under Policy select Deny. By default any traffic is allowed, we have to deny it. I have only one functional interface so I left All Interfaces, but in this case Direction is Out. Select In when you are creating rule which is filtering traffic that coming to you. My recommendation is to set Log in order to review rules behavior. Now, crucial point. Select protocol as TCP (HTTPS id TCP protocol), type your IP address and left port blank (this means any port) for From and for To select 206.190.36.45 and port 443 (HTTPS port) in ordet to point to Yahoo (Slide 6). Select Add.

Configure Ubuntu desktop firewall

Slide 6.

Notify change in Firewall interface (Slide 7.). Your rule is added.

Configure Ubuntu desktop firewall

Slide 7.

 

Now I will login as another user, which is affected by this rule and I will type https://206.190.36.45 again. Page will be unreachable (Slide 8).

Configure Ubuntu desktop firewall

Slide 8.

I hope this tutorial was informative to you and thank you for visiting this website.

 

 

Dejan Dzodan

Dejan Dzodan

IT professional for more then 15 years, mostly in financial institutions but with experience in ISP and retail. Proven in networking and overall infrastructure projects. Cisco instructor.

Leave a Reply

Your email address will not be published. Required fields are marked *


1 + 1 =