how to check firewall rules in centos 7 code example
Example 1: is firewall running centos 7
systemctl status firewalld
Example 2: firewall-cmd status
# firewall-cmd --state
systemctl status firewalld
# firewall-cmd --state