In this recipe, you'll learn how to replace FirewallD with the iptables service and perform basic firewall configurations. iptables was the default method for managing the firewall's settings in CentOS prior to version 7. Some administrators might prefer iptables because it's within their comfort level or maybe they have several older servers running in the data center and they want to maintain similarity as much as possible.
This recipe requires a CentOS system with a working network connection. You'll also need administrative privileges provided by logging in with the root
account.
The following steps will allow you to replace FirewallD with the iptables service:
Stop the FirewallD service and disable it:
systemctl stop firewalld systemctl mask firewalld
Install the
iptables-services
package which contains the service:yum install iptables-services
Start the service and register it so that it will start automatically...