Replace firewalld with iptables in CentOS 7
This is a short HOWTO replace or disable firewalld with iptables in CentOS 7.
Install iptables service
# yum -y install iptables-services
If you would like to save the firewall rules you need to run the following command
# iptables-save > iptables-rules.txt
These rules can be added to /etc/sysconfig/iptables but I usually use the rules that come with iptables package and add my rules to better suit my needs.
# systemctl enable iptables
# systemctl enable ip6tables
Stop firewalld
# systemctl stop firewalld
Disable firewalld
# systemctl disable firewalld
Start iptables service
# systemctl start iptables
# systemctl start ip6tables
And thats it.
Note
Always make sure that you are not locking yourself out of your server when starting the iptables firewall.