Linux

How to disable the UFW firewall in Linux

If you’re not happy with the UFW firewall on your Linux PC and want to uninstall it but don’t know where to start, it’s understandable. For as good as this firewall is, no mainstream Linux OS goes over how to use it. 

In this guide, we’ll go over how you can shut off and even uninstall the UFW firewall. To start, ensure you have system-level access to your Linux PC, as turning off the firewall requires root access. Then, follow along below!

disable the UFW firewall in Linux

Turn off UFW – terminal

If you need to shut off the UFW firewall on your Linux PC, the best way to do it is with the command line. The reason? UFW is a command-line app, and while many Linux OSes use GUFW, a GUI for the command line app, it is far more efficient via terminal.

To get started, open up a terminal window on the Linux desktop. To do that, press Ctrl + Alt + T on the keyboard or search for “Terminal” in the app menu and launch it that way.

Once the terminal window is open and ready to use, execute the ufw –help command. This command will show you all command arguments available for the UFW firewall and aid you in turning it on and off at will.

ufw --help

Look through the help page for the “disable” section, and read what it does. Be sure also to read the “enable” section and anything else that you might find helpful. When done reading, execute the command below to shut off the firewall.

sudo ufw disable

After entering the command above, the system will ask for a password. Using the keyboard, type in your user account password and press the Enter key. The UFW firewall should instantly be shut off. 

You can check the status of the UFW firewall to see if it is indeed shut off using the ufw status command. If UFW says “inactive,” the command worked. Otherwise, re-run the command.

sudo ufw status

Want to turn on the UFW firewall again? Run the ufw enable command below to turn on the Firewall instantly. 

sudo ufw enable

Turn off UFW – GUI

If you manage your UFW firewall with the UFW UI app (GUFW) and need to turn it off, do the following. First, launch GUFW by doing the following. First, search for “Firewall configuration” or “GUFW” in the app menu and launch it.

Once the app is open and ready to use, locate the “Status” slider in the UI. If the UFW firewall is active, this “Status” slider will be switched on. To shut it off, click on the slider. 

If you want to turn on the firewall again, click on the slider.

Uninstall UFW/GUFW 

If you’re done with the UFW firewall or want to replace it with a different firewall and shutting it off temporarily isn’t enough, you may need to uninstall it. To uninstall it, start by launching a terminal window.

To open up a terminal window on the Linux desktop, press Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in the app menu. Once the terminal window is open and ready to use, follow along with the uninstallation commands that correspond with the Linux OS, you use.

Ubuntu

To remove the UFW firewall from Ubuntu altogether, execute the apt remove command alongside the –purge command line switch. The –purge switch will delete all configuration files and everything from the system.

sudo apt remove ufw --purge

To uninstall the GUI Firewall, run the command above but on the “gufw” package.

sudo apt remove gufw --purge

Debian

If you need to uninstall the UFW firewall from Debian, use the apt-get remove command along with the –purge command-line switch. Like on Ubuntu, this switch will delete all configuration files and everything from the system.

sudo apt-get remove ufw --purge

To get rid of the GUI firewall app, execute the command above but with the “gufw” package. 

Arch Linux

If you’d like to uninstall UFW from Arch Linux, you’ll need to use Pacman with the -Rsc command switch. This command switch will not only uninstall UFW but will also remove all dependencies installed alongside it. To remove UFW from your Arch Linux system, enter the command below in a terminal window.

sudo pacman -Rsc ufw

If you would like to remove the GUI firewall app from Arch Linux, execute the command above but with the “gufw” package.

sudo pacman -Rsc gufw

Fedora

If you’re using Fedora Linux, you can get rid of the UFW firewall from your system by using the dnf remove command. This command will uninstall the program and get rid of it so that you no longer have it set up on your Fedora PC.

sudo dnf remove ufw

To remove the GUI firewall, execute the command above but with the “gufw” package. 

sudo dnf remove gufw

OpenSUSE

If you need to get rid of UFW from your OpenSUSE system, you can use the zypper remove command. This command will delete the package from the OpenSUSE system so that you can no longer use it.

sudo zypper remove ufw

To get rid of the GUI firewall from OpenSUSE, execute the same command but with the “gufw” package.

sudo zypper remove gufw

Похожие статьи

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Проверьте также
Закрыть
Кнопка «Наверх»