Removing Firewalld and returning to iptables

Firewalld may not be to everyone's liking and you may prefer iptables. So, on a final note, if you ever find yourself in a situation where you do not want to use Firewalld, you can return to iptables easily.

To begin with, you should disable Firewalld like this:

# systemctl disable firewalld
# systemctl stop firewalld

You should then install and configure iptables by typing:

# yum install iptables-services
# touch /etc/sysconfig/iptables
# touch /etc/sysconfig/ip6tables

Now, start the iptables service with the following commands:

# systemctl start iptables
# systemctl start ip6tables
# systemctl enable iptables
# systemctl enable ip6tables

From this point onwards, you now have iptables as your firewall ...

Get Troubleshooting CentOS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.