How to enable Iptables firewall in CenOS 7 / RHEL 7
After fresh installation of CentOS 7, I was trying to open some ports using iptables as usual in CentOS 5 or CentOS 6. But something was wrong with my iptables service. Whats wrong with it?
Asnwer:With the relase of CentOS 7 / RHEL 7, firewalled was introduced to manage iptables. But fortunately it is possible to go back a more classic iptables setup:
1. Stop Firewalld Service
# systemctl stop firewalld
2. Disable Firewalld Service
# systemctl mask firewalld
3. Use following command to Install iptables-service package
# yum -y install iptables-services
4. Enable the service at startup
# systemctl enable iptables
5. Start iptables service
# systemctl start iptables
Now iptables are available as your firewall, you can remove / add rules as you were doing in older releases of CentOS /RHEL 5 and 6. Enjoy :). Do not forget to say thanks if it works for you.