check ufw status code example
Example 1: sudo ufw status Status: inactive
sudo ufw enable
Example 2: RHEL check the firewall status
[root@rhel7 ~]# systemctl enable firewalld
sudo ufw enable
[root@rhel7 ~]# systemctl enable firewalld