0

I don't want the service to start after reboot. my code does this:

service iptables stop
service iptables save
chkconfig --level 123456 iptables off
service iptables status
iptables: Firewall is not running.

but after reboot:

[root@cteraportal ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

why is it starting at boot even after the chckonfig off?

1
  • This does not mean iptables is active. It just shows you the default chains which are empty. Commented May 7, 2014 at 9:38

1 Answer 1

1

why is it starting at boot even after the chckonfig off?

SysV init (which is what use of the service command implies) doesn't track services itself, it just executes commands from "init scripts", and these are supposed to do whatever checking is particular to the service. You should have a look at the init script (probably /etc/init.d/iptables or similar) and what it does in response to status. It probably just calls this:

iptables -L

Note this does not check in with a userland daemon since there is no such thing WRT iptables; the core functioning is actually provided by the kernel, and the userland tools are just for configuring or querying the kernel's net filtering rules.

In this sense, it cannot be turned "off" because it isn't something that's turned on to start with -- establishing a firewall is just a matter of passing the kernel a set of filtering rules for network packets. However, if there aren't any rules, then there isn't any filtering going on. This is what your service iptables status reflects.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .