How to enable and disable firewall in Ubuntu?

  • Post last modified:April 27, 2021
  • Reading time:2 mins read

Through this article we will see how we can enable and disable firewall in Ubuntu based system.

Firewall is used to allow and block the request

UFW stands for Uncomplicated Firewall it is a default firewall in the Ubuntu.

We will show you two-way to enable and disable it.

  1. GUI (gufw)
  2. CLI (ufw)

1. Manage UFW through Terminal

#Check Firewall status

First we check the firewall status, ufw require sudo permission

$ sudo ufw status
To check status
To check status

By default, firewall status will be inactive.

$ sudo ufw status verbose

If you want output in verbose then add verbose in last.

#Enable Firewall

To enable firewall we need to type in terminal

$ sudo ufw enable
To enable ufw
To enable ufw

Now firewall is active, To check status then type

$ sudo ufw status
#Disable Firewall

We have seen how to enable firewall now we will see how to disable it.

$ sudo ufw disable
To Disable Firewall
To Disable Firewall

Now Firewall is disabled, To check the current status.

2. Managing UFW through GUI

To manage UFW Graphical then we require “gufw” to install in your system and many other firewall GUI application available.

We will install gufw

$ sudo apt install gufw

After getting install in a same terminal if you type “gufw” then firewall application will start.

Otherwise, you can search in start menu option you need to search firewall or gufw

Search firewall or gufw
Search firewall or gufw

Open the application this will ask you the password enter the password.

Enter Password
Enter Password

This will be default GUI main screen.

Main Screen Of gufw
Main Screen Of gufw

By default, ufw status will be off if you want turn on or off as per your requirement.

It has 3 pre-default profiles in this Home, Office and Public and many other preferences too.

This was the basic step to activate firewall through both terminal and GUI. In the next article we share you advance configuration of firewall.

Read this: How to remove or disable title bar from firebox browser?

Like what you read? Please share it with others.

Leave a Reply