How to disable Firewalld and use Iptables instead.
If you don’t get used to Firewalld, you can still rely on Iptables by following the instructions below provided by the Fedora project.
If you don’t get used to Firewalld, you can still rely on Iptables by following the instructions below provided by the Fedora project.
Procedure
Install the Iptables package:
# yum install -y iptables-services
Disable the Firewalld service:
# systemctl mask firewalld
Activate the iptables and ip6tables services at boot:
# systemctl enable iptables # systemctl enable ip6tables
Go to the /etc/sysconfig directory and define your rules in the iptables, ip6tables, iptables-config and ip6tables-config files.
Stop the Firewalld service:
# systemctl stop firewalld
Start the iptables and ip6tables service:
# systemctl start iptables # systemctl start ip6tables
You can now run the system-config-firewall or the iptables commands without any problem.
Additional Resources
If you have been running Firewalld for some time and want to go back to Iptables without losing your rules, Justin Ellingwood wrote an interesting article about this situation: How To Migrate from FirewallD to Iptables on CentOS 7.
You can also have a look at this Introduction to IPTables.