Default in-built rules in iptables

Issues related to configuring your network
Post Reply
JohnMelody
Posts: 1
Joined: 2018/05/22 09:00:35

Default in-built rules in iptables

Post by JohnMelody » 2018/05/22 09:16:07

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?

User avatar
TrevorH
Forum Moderator
Posts: 23678
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Default in-built rules in iptables

Post by TrevorH » 2018/05/22 09:50:08

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.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

tunk
Posts: 424
Joined: 2017/02/22 15:08:17

Re: Default in-built rules in iptables

Post by tunk » 2018/05/22 17:44:53

In addition to disabling and masking it, I think you have to stop it (or reboot): systemctl stop firewalld

Post Reply