Home BackTrack Configure Linux Built-In Firewall

Configure Linux Built-In Firewall

Configure Linux Built-In Firewall

 Configure Linux Built-In Firewall ?

Firewall is always a best layer of defense of any operating system. Ubuntu includes it,s own firewall named  as ufw – short for “uncomplicated firewall.” Ufw is an easier-to-use frontend for the standard Linux iptables commands. You can even control ufw from a graphical interface.

By default Linux firewall is disabled  you need to be enable this firewall. In my lab i am using the Backtrack5R3 based on Ubuntu.

Enable your built-in firewall with $sudo ufw enable  command.   

                                                                                                                                                             I already enable the firewall, so it will give you message ” Firewall is enable and active on Start-up ”

Configure Linux Built-In Firewall

GUFW Graphical Interface :- 

GUFW is a graphical interface for ufw. Ubuntu doesn’t come with a graphical interface, but gufw is included in Ubuntu’s software repositories. You can install it with the following command:

sudo apt-get install gufw

 GUFW appears in the Dash as an application named Firewall Configuration. Like ufw itself, GUFW provides a simple, easy-to-use interface. You can easily enable or disable the firewall, control the default policy for inbound or outbound traffic, and add rules.

Configure Linux Built-In Firewall

Now Go to the System menu > Administration and open Firewall  configuration

Configure Linux Built-In Firewall

now click on the add button to define your rule.

Working With Rules

Let’s say you want to allow SMTP traffic on port 25. To do so, you can run one of several commands:

sudo ufw allow 25 (Allows both TCP and UDP traffic – not ideal if UDP isn’t necessary.)

sudo ufw allow 25/tcp  (Allows only TCP traffic on this port.)

sudo ufw allow smtp (Checks the /etc/services file on your system for the port that Smtp requires and allows it. Many common services are listed in this file.)

Ufw assumes you want to set the rule for incoming traffic, but you can also specify a direction. For example, to block outgoing Smtp traffic, run the following command:

sudo ufw reject out smtp

You can view the rules you’ve created with the following command:

sudo ufw status

I found a good free firewall for Linux called Shorewall. If you  are running Linux and you don’t have firewall download it from http://shorewall.net/

Hope you like my post Configure Linux Built-In Firewall. Please Share with others.

Previous articleRun Google-chrome as root on Backtrack
Next articleUse Netstat Command in Professional Way

1 COMMENT

  1. Heya i am for the primary time here. I came across this board and I in finding It truly helpful & it helped me out a lot. I am hoping to provide something again and aid others like you helped me.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

twelve + 13 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.