Latest:

RHEL 7 / CentOS 7 : Disable Firewalld and use iptables

Tutorial willing 402Views 0 comment

Hello,

Just installed CentOS 7 on my Virtual machine and realized that, Firewalld is bit complicated as I am using iptables firewall from many years. So decided not to use firewalld at least as of now and wanted to continue with iptables commands as I was using in RHEL / CentOS 5 and 6.

I thought iptables will not be there and I will have to deal with firewalld but a little small trick in RHEL7 takes me to the solution which I wanted and I found that I can still use the iptables by disabling firewalld service.

So, If you are in same condition as mine and you want to use iptables on CentOS / RHEL 7 instead of firewalld, Please follow this howto.

FirewallFirewall

As we all know that, CentOS / RHEL 7 both are completely systemd based, So We will have to use few systemd related commands to disable firewalld and enable iptables service.

1. Disable Firewalld Service.

[[email protected] ~]# systemctl mask firewalld

2. Stop Firewalld Service.

[[email protected] ~]# systemctl stop firewalld

3. Install iptables service related packages.

[[email protected] ~]# yum -y install iptables-services

4. Make sure service starts at boot:

[[email protected] ~]# systemctl enable iptables

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

[[email protected] ~]# systemctl enable ip6tables

5. Now, Finally Let’s start the iptables services.

[[email protected] ~]# systemctl start iptables

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

[[email protected] ~]# systemctl start ip6tables

Firewalld Service is now disabled and stop, You can use iptables.

Now, You will be able to use iptables as your firewall, You can add / remove rules as you were doing in previous releases of Red Hat / CentOS 5 and 6, You can configure firewall with iptables in same manner as previous.

Enjoy Linux :) Enjoy Firewall :) Enjoy iptables :) Enjoy ip6tables :) Enjoy FirewallD :) Enjoy CentOS 7 :) Enjoy RHEL 7 :) Enjoy Open Source

 

Source:http://www.tuicool.com/articles/hit/YVzIzm

Keep link to this when copy:VPS List Agent » RHEL 7 / CentOS 7 : Disable Firewalld and use iptables

You must Login to submit a comment