sudo install ufw code example
Example 1: install ufw centos
sudo yum install epel-release -y
sudo yum install --enablerepo="epel" ufw -y
#after install it, enable ufw
sudo ufw enable
#check ufw status
sudo ufw status
Example 2: enable ufw ubuntu
sudo ufw enable