CentOS 7 Firewall Configuration
Solution 1:
Since the release of RedHat/CentOS 7, the previous firewall system has been replaced with firewalld.
At the time of writing there is no curses-like console interface similar to system-config-firewall. If you don't mind using a GUI you could use firewall-config instead.
If you need something for the console you will have to use firewall-cmd instead.
For more information and full documentation about firewalld: 4.5. Using Firewalls
I hope this might help you!
Solution 2:
Here are some commands with descriptions below that I came across and were helpful
firewall-cmd --state
view status of firewalld service (systemctl status firewalld)
firewall-cmd --zone=public --list-all
gets all info for the “public” zone
firewall-cmd --list-all-zones
shows all info for all zones
firewall-cmd --zone=public --add-port=80/tcp --permanent
adds port 80 to public zone
firewall-cmd --zone=public --add-service=http --permanent
adds service http to public zone
firewall-cmd --reload
run this after making changes
firewall-cmd --zone=public --remove-port=80/tcp --permanent
to remove port 80 from public zone
firewall-cmd --get-default-zone
shows default zone for firewall
firewall-cmd --get-active-zones
zones where network interfaces or sources are assigned