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 iptablesip6tablesiptables-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.

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time
Comments

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More