Do you know that Ubuntu equips with built in firewall feature??. Yes, you heard that right friends, Ubuntu includes its own firewall which is known as UFW (Uncomplicated Firewall). You can use different command in order to use this firewall easily and efficiently.
In this article, we will provide you two methods to configure your inbuilt firewall. Just have a glance at this article to know how to install and configure built-in firewall in Ubuntu 14.04.
Methods to install and configure built in firewall:
Method 1 of 2: By using Ubuntu Commands
Step 1: First open your terminal by hitting “Ctrl + ALT +T” and then under terminal type: “sudo ufw enable” in order to enable uncomplicated firewall. Type your Ubuntu password when asked and then press enter, you may see a message “Firewall is active and enabled on system startup”.
Step 2: You have to specify a set of rules for incoming traffic. Now if you want to add rules say to allow or reject SSH traffic to any port, then type: “sudo ufw reject out ssh” and press enter.
Step 3: Now type: “sudo ufw status” in order to see the rule you’ve created.
Step 4: To delete any rule just type: “sudo ufw delete reject out ssh” and press enter.
Step 5: If you want to deny TCP traffic to any particular port, then type: “sudo ufw deny proto tcp from 126.96.36.199 to any port 22”.
Step 6: If you want to reset the firewall to its default state, then type: ” sudo ufw reset” and then press ‘y'(yes), when prompted to proceed further with your operation.
Step 7: Now if you want to see the list of Application profiles, then type: “sudo ufw app list”. Here, you’ll see a list of available applications. Select the application which you want to allow, for that type: “sudo ufw allow application name” for, e.g., “sudo ufw allow CUPS”. (Note: You can use “sudo ufw app info application name” in order to find out information about that application).
Method 1 of 2: By using Graphical interface.
Step 1: Now type: “sudo apt-get install gufw” where ‘GUFW’ is a graphical interface for ufw. Press enter. (Note: Ubuntu doesn’t come up with graphical interface for firewall).
Step 2: Type “exit” to close your terminal.
Step 3: Now open your Unity Dash and type “firewall”. You’ll see a firewall icon, just click on that to open.
Step 4: You’ll be required to type your password for authentication as shown in the image below.
Step 5: After that You may see your firewall screen, now go to the status tab and switch on your firewall.
Step 6: You may also see different options like Rules, Listening reports and log.
Step 7: If you want to add any rules then go to the “Rules” option and then click on “+” sign.
Step 8: You’ll see a new window pops open, here go to “Advanced” tab, where you can properly define your rules.
That’s all friends, Keep reading.