How To Install ufw on Fedora 34

ufw is Uncomplicated Firewall

Introduction

In this tutorial we learn how to install ufw on Fedora 34.

What is ufw

The Uncomplicated Firewall(ufw) is a front-end for netfilter, which aims to make it easier for people unfamiliar with firewall concepts. Ufw provides a framework for managing netfilter as well as manipulating the firewall.

We can use yum or dnf to install ufw on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install ufw.

Install ufw on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install ufw using dnf by running the following command:

sudo dnf -y install ufw

Install ufw on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install ufw using yum by running the following command:

sudo yum -y install ufw

How To Uninstall ufw on Fedora 34

To uninstall only the ufw package we can use the following command:

sudo dnf remove ufw

ufw Package Contents on Fedora 34

/etc/default/ufw
/etc/ufw
/etc/ufw/after.init
/etc/ufw/after.rules
/etc/ufw/after6.rules
/etc/ufw/applications.d
/etc/ufw/applications.d/fedora-icecream
/etc/ufw/applications.d/fedora-kdeconnect
/etc/ufw/applications.d/fedora-multicast
/etc/ufw/applications.d/ufw-bittorent
/etc/ufw/applications.d/ufw-chat
/etc/ufw/applications.d/ufw-directoryserver
/etc/ufw/applications.d/ufw-dnsserver
/etc/ufw/applications.d/ufw-fileserver
/etc/ufw/applications.d/ufw-loginserver
/etc/ufw/applications.d/ufw-mailserver
/etc/ufw/applications.d/ufw-printserver
/etc/ufw/applications.d/ufw-proxyserver
/etc/ufw/applications.d/ufw-webserver
/etc/ufw/before.init
/etc/ufw/before.rules
/etc/ufw/before6.rules
/etc/ufw/sysctl.conf
/etc/ufw/ufw.conf
/usr/lib/python3.9/site-packages/ufw
/usr/lib/python3.9/site-packages/ufw-0.35-py3.9.egg-info
/usr/lib/python3.9/site-packages/ufw/__init__.py
/usr/lib/python3.9/site-packages/ufw/__pycache__
/usr/lib/python3.9/site-packages/ufw/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/applications.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/applications.cpython-39.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/backend.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/backend.cpython-39.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/backend_iptables.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/backend_iptables.cpython-39.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/common.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/common.cpython-39.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/frontend.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/frontend.cpython-39.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/parser.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/parser.cpython-39.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/util.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ufw/__pycache__/util.cpython-39.pyc
/usr/lib/python3.9/site-packages/ufw/applications.py
/usr/lib/python3.9/site-packages/ufw/backend.py
/usr/lib/python3.9/site-packages/ufw/backend_iptables.py
/usr/lib/python3.9/site-packages/ufw/common.py
/usr/lib/python3.9/site-packages/ufw/frontend.py
/usr/lib/python3.9/site-packages/ufw/parser.py
/usr/lib/python3.9/site-packages/ufw/util.py
/usr/lib/systemd/system/ufw.service
/usr/libexec/ufw
/usr/libexec/ufw/ufw-init
/usr/libexec/ufw/ufw-init-functions
/usr/sbin/ufw
/usr/share/doc/ufw
/usr/share/doc/ufw/AUTHORS
/usr/share/doc/ufw/ChangeLog
/usr/share/doc/ufw/README
/usr/share/doc/ufw/TODO
/usr/share/licenses/ufw
/usr/share/licenses/ufw/COPYING
/usr/share/locale/ar/LC_MESSAGES/ufw.mo
/usr/share/locale/ast/LC_MESSAGES/ufw.mo
/usr/share/locale/bg/LC_MESSAGES/ufw.mo
/usr/share/locale/bs/LC_MESSAGES/ufw.mo
/usr/share/locale/ca/LC_MESSAGES/ufw.mo
/usr/share/locale/ce/LC_MESSAGES/ufw.mo
/usr/share/locale/cs/LC_MESSAGES/ufw.mo
/usr/share/locale/da/LC_MESSAGES/ufw.mo
/usr/share/locale/de/LC_MESSAGES/ufw.mo
/usr/share/locale/el/LC_MESSAGES/ufw.mo
/usr/share/locale/en_AU/LC_MESSAGES/ufw.mo
/usr/share/locale/en_GB/LC_MESSAGES/ufw.mo
/usr/share/locale/es/LC_MESSAGES/ufw.mo
/usr/share/locale/et/LC_MESSAGES/ufw.mo
/usr/share/locale/fi/LC_MESSAGES/ufw.mo
/usr/share/locale/fr/LC_MESSAGES/ufw.mo
/usr/share/locale/he/LC_MESSAGES/ufw.mo
/usr/share/locale/hu/LC_MESSAGES/ufw.mo
/usr/share/locale/id/LC_MESSAGES/ufw.mo
/usr/share/locale/it/LC_MESSAGES/ufw.mo
/usr/share/locale/ja/LC_MESSAGES/ufw.mo
/usr/share/locale/ko/LC_MESSAGES/ufw.mo
/usr/share/locale/lv/LC_MESSAGES/ufw.mo
/usr/share/locale/nb/LC_MESSAGES/ufw.mo
/usr/share/locale/nl/LC_MESSAGES/ufw.mo
/usr/share/locale/pl/LC_MESSAGES/ufw.mo
/usr/share/locale/pt/LC_MESSAGES/ufw.mo
/usr/share/locale/pt_BR/LC_MESSAGES/ufw.mo
/usr/share/locale/ru/LC_MESSAGES/ufw.mo
/usr/share/locale/se/LC_MESSAGES/ufw.mo
/usr/share/locale/sk/LC_MESSAGES/ufw.mo
/usr/share/locale/sl/LC_MESSAGES/ufw.mo
/usr/share/locale/sr/LC_MESSAGES/ufw.mo
/usr/share/locale/sv/LC_MESSAGES/ufw.mo
/usr/share/locale/tl/LC_MESSAGES/ufw.mo
/usr/share/locale/tr/LC_MESSAGES/ufw.mo
/usr/share/locale/uk/LC_MESSAGES/ufw.mo
/usr/share/locale/ur/LC_MESSAGES/ufw.mo
/usr/share/locale/zh_CN/LC_MESSAGES/ufw.mo
/usr/share/locale/zh_TW/LC_MESSAGES/ufw.mo
/usr/share/man/man8/ufw-framework.8.gz
/usr/share/man/man8/ufw.8.gz
/usr/share/ufw
/usr/share/ufw/iptables
/usr/share/ufw/iptables/after.rules
/usr/share/ufw/iptables/after6.rules
/usr/share/ufw/iptables/before.rules
/usr/share/ufw/iptables/before6.rules
/usr/share/ufw/iptables/user.rules
/usr/share/ufw/iptables/user6.rules
/var/lib/ufw
/var/lib/ufw/user.rules
/var/lib/ufw/user6.rules

References

Summary

In this tutorial we learn how to install ufw on Fedora 34 using yum and dnf.