firewalld status code example
Example 1: firewall-cmd status
# firewall-cmd --state
Example 2: RHEL check the firewall status
[root@rhel7 ~]# systemctl enable firewalld
# firewall-cmd --state
[root@rhel7 ~]# systemctl enable firewalld