firewalls, centos,

How to install UFW on CentOS 7

Dec 08, 2021 · 1 min read · Post a comment

Most of the RHEL Linux distros are coming with pre-installed firewalld as a default firewall. But if you are UFW fan and you don’t want to waste your time or resources on getting familiar with firewalld, I will show you how to install UFW on CentOS 7. It’s pretty quick and easy, so let’s start.


  • CentOS 7
  • sudo privileges

Install UFW on CentOS 7

Step 1. Firstly update the CentOS 7 system packages.

sudo yum update

Step 2. Install the epel-release repo, from where we can install UFW.

sudo yum install epel-release

Step 3. Install UFW.

yum install --enablerepo="epel" ufw

Step 4. Verify installation and check the version with:

ufw --version


ufw 0.35

Step 5. Once the installation is done enable it.

sudo ufw enable

Step 6. To check the status, run:

sudo ufw status


For any additional questions or concerns please leave a message below. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.