Page 1 of 1

Default in-built rules in iptables

Posted: 2018/05/22 09:16:07
by JohnMelody
I installed CentOS 7 for the first time recently and decided to stick with iptables, as it was what I was used to, so I installed iptables-services on the CentOS 7 box and I disabled and masked firewalld.

On CentOS 6 I usually disabled the firewall by running
# service iptables stop
it would stop the firewall and also remove all rules so an
# iptables -S
would show the following
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

However on CentOS 7 if I type
# service iptables stop or systemctl stop iptables
and I issue the
iptables -S command following this all the rules are still defined

Is there something else I am missing that maybe was configured by default on CentOS 6 that I have not configured correctly on the new CentOS7?

Re: Default in-built rules in iptables

Posted: 2018/05/22 09:50:08
by TrevorH
Are you sure that firewalld isn't still installed and running? If you aim to use iptables-services then I would yum remove it entirely.

Re: Default in-built rules in iptables

Posted: 2018/05/22 17:44:53
by tunk
In addition to disabling and masking it, I think you have to stop it (or reboot): systemctl stop firewalld