How To Install ufw on Rocky Linux 8

In this tutorial we learn how to install ufw on Rocky Linux 8. ufw is Uncomplicated Firewall

Introduction

In this tutorial we learn how to install ufw on Rocky Linux 8.

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 Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install ufw.

Install ufw on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install ufw

Install ufw on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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 Rocky Linux 8

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

sudo dnf remove ufw

ufw Package Contents on Rocky Linux 8

/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.6/site-packages/ufw
/usr/lib/python3.6/site-packages/ufw-0.35-py3.6.egg-info
/usr/lib/python3.6/site-packages/ufw/__init__.py
/usr/lib/python3.6/site-packages/ufw/__pycache__
/usr/lib/python3.6/site-packages/ufw/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/applications.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/applications.cpython-36.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/backend.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/backend.cpython-36.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/backend_iptables.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/backend_iptables.cpython-36.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/common.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/common.cpython-36.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/frontend.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/frontend.cpython-36.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/parser.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/parser.cpython-36.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/util.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/ufw/__pycache__/util.cpython-36.pyc
/usr/lib/python3.6/site-packages/ufw/applications.py
/usr/lib/python3.6/site-packages/ufw/backend.py
/usr/lib/python3.6/site-packages/ufw/backend_iptables.py
/usr/lib/python3.6/site-packages/ufw/common.py
/usr/lib/python3.6/site-packages/ufw/frontend.py
/usr/lib/python3.6/site-packages/ufw/parser.py
/usr/lib/python3.6/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 Rocky Linux 8 using yum and dnf.