15
3
When I run on my linux Redhat version 6.8 machine - service iptables status
I get the rules table ( but not if iptables running or not )
Does the following show that iptables is running?
# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject- with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject- with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
Iptables is enabled on boot
# chkconfig --list iptables
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
6Not always true. Under CentOS7 you have
firewalld
installed by default, and you can check its status by runningsystemctl status firewalld
. Also, a package callediptables-services
can be installed and if started (service name:iptables
), you can check if it's running or not. – nKn – 2016-09-14T16:07:06.9433@nKn - the question was: how to verify if iptables is running. firewalld does NOT replace iptables, it's just used to configure it. A dead firewalld with active iptables rules mean, that the firewall is UP, not DOWN – Eugen Rieck – 2016-09-14T16:11:05.883
1Exactly, and I said it can be checked installing the
iptables-services
packages and checkingsystemctl status iptables
, which will tell you ifiptables
is running or not. – nKn – 2016-09-14T16:14:39.837And again, again, again: There is no such thing as "iptables is running". – Eugen Rieck – 2016-09-15T08:07:47.673
1@nKn Thanks bro.
firewalld
was my issue! – Habeeb Perwad – 2018-02-28T10:20:28.487