Monday, August 29, 2016

Replace Firewalld with iptables

 Fedora/CentOS7 / RHEL 7  are completely systemd based, So on these versions of Linux we need to use systemd commands to disable firewalld and enable iptables


  •  Disable Firewalld Service.

# systemctl mask firewalld

  • Stop Firewalld Service.

# systemctl stop firewalld

  • Install iptables service related packages.

# yum -y install iptables-services

  • Make sure service starts at boot:

# systemctl enable iptables

 If you do not want ip6tables, You can skip following command
# systemctl enable ip6tables

  • start the iptables services.

# systemctl start iptables

 If you do not want ip6tables, You can skip following command.
# systemctl start ip6tables

Firewalld Service is now disabled, You can use iptables.

No comments: