How to block ports in Ubuntu 16.04 Firewall

To safeguard your computer from being hacked, you can block ports of Operating System Linux Ubuntu through its Firewall. You can allow only required ports and block rest of all. To do the same below steps can be followed.
Step 1.Start your computer installed with Linux Ubuntu operating system. When you reached below screen click on first icon i.e. ‘Search button’.

Step 2.Firewall configuration icon will be shown. Click on it, an authentication window will appear asking to enter password. When password is typed press enter key.

Step 3.Now Firewall window is open as below image.

Step 4.There are three types of profile in it namely Home, Public and Office. Set two out of three profile as status ‘off’. For example: Home is your selected profile with status ‘On’.


Step 5.Select the incoming and outgoing value as ‘Deny’ as below image. This step will block all the ports of your computer.

Step 6.As our all ports are blocked now we can allow any port to work upon by using the ‘Rules’ in Ubuntu firewall. So now we learn how to use the ‘Rules’. Just click on Rules a window will appear as below. Click on plus icon ‘+’.

Step 7.Add rule window as below screen shot will appear. Select ‘Simple’ and Policy as ‘Allow’.

Step 8.Select Direction as ‘Both’ and enter port number for example as ‘1245’. Click on ‘Add’ button and rule will be created.

Step 9.Now ‘1245’ port number is open which you can see as below screen shot.

* The Content stated above is for informational purpose only. Expert Software Team is not responsible if any part of content found meaningless in any manner or condition.