Categories: Ubuntu

How to Disable Firewall in Ubuntu

Ubuntu is a popular Linux Operating System having its own firewall known as ufw (uncomplicated firewall).  In Ubuntu we can both enable or disable that firewall according to our requirement. It is very advised to keep the firewall turned on, but in some situations like trouble shooting or testing you might need to disable the firewall.

Firewall is an operating system’s network security system that observes and maintains network traffic based on defined rules. Firewall also assists in monitoring the networks whether they are trusted or untrusted. Moreover they defend your computer from hackers by separating out malicious network traffic. Ubuntu’s firewall ufw is a user-friendly front-end for maintaining iptables firewall rules. Its major purpose is to make firewall rule management much easier, or uncomplicated, as the name implies.

Sponsored

This write up is focussing on how to disable/turnoff the Ubuntu firewall. Use any of the approaches mentioned below to disable the ufw firewall from Ubuntu System successfully.

Method 1: Disable Firewall in Ubuntu using Command Line

To disable firewall using terminal, follow the steps below:

Step 1: Checking Status of Firewall
First check that your ufw firewall status whether its enabled or not to disable it as Ubuntu firewall is disabled by default, run the below mentioned command to check its status:

$ sudo ufw status

So status is “active”, this means that ufw is enabled in your Ubuntu system now you have to disable it.

Step 2: Disabling Firewall
Now if you are facing some major issues because of firewall and want to disable it then run the below mentioned command in your Ubuntu system:

$ sudo ufw disable

Now the firewall is disabled as shown above and you can now perform the task which you were not able to do because the firewall was enabled.

Step 3 : Verifying status of Firewall
Now again check the status of ufw firewall to confirm that firewall is disabled by below mentioned command:

$ sudo ufw status

Now the status of the firewall is disabled.

Method 2: Disable Firewall by gufw

The gufw utility is a user-friendly graphical interface to ufw that allows you to manage your firewall without having to type ufw instructions on the command line. So if you want to disable ufw by graphical interface follow the procedure below:

Step 1: Installing gufw
Open terminal and run the below mentioned command to install gufw:

Sponsored
$ sudo apt install ufw

Step 2: Launching gufw app
Open “Activities” and write “gufw” in search bar and click on gufw icon shown below:

An authentication dialogue box will appear enter your passcode and click on “Authenticate:

A “Firewall” window is opened:

Step 3: Disabling Firewall
Check its status:

It is enabled right now, turn it off by moving bar to left and firewall will be disabled:

Conclusion

UFW or Uncomplicated FireWall is Ubuntu’s firewall configuration tool that comes preinstalled. UFW has a user-friendly front-end for maintaining iptables firewall rules. Its major purpose is to make firewall rule management easier, or simplistic, as the name implies. Sometimes you need to disable this firewall because of testing purposes, in this Article we described two methods to disable/turnoff firewall by command line interface and by gufw (graphical interface). You can follow any method you find easy.

Ubuntu Server Admin

Recent Posts

Install FreePBX and Asterisk on Ubuntu 24.04 LTS for security patches until 2036

Deploying FreePBX and Asterisk on a single Ubuntu virtual machine in a public cloud is…

2 days ago

Certification as a strategy: How Ubuntu & SystemReady boost hardware competitiveness

Canonical and MediaTek enhance reliability, accelerate market entry and reduce Total Cost of Ownership (TCO)…

2 days ago

Ubuntu 20.04 LTS on Azure: how to stay secure after standard support ends

As Ubuntu 20.04 LTS (Focal Fossa) standard support ends on May 31, 2025, Azure users…

2 days ago

Ubuntu Weekly Newsletter Issue 881

Welcome to the Ubuntu Weekly Newsletter, Issue 881 for the week of February 23 –…

2 days ago

Experiment Tracking with MLFlow in Canonical’s Data Science Stack

Welcome back, data scientists! In my previous post, we explored how easy it is to…

3 days ago

How to Install vLLM on Linux Using 4 Easy Steps

In this article, we will see how to install vLLM on Linux using 4 easy…

3 days ago