I want to know whether my iptables are running or not currently.
When I use below command, i get the output.
[root@nntest1 ~]# service iptables status
Firewall is stopped.
But if i use below commands, then i don't get the output.
[root@nntest1 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@nntest1 ~]# 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
Any idea how to get previous output (Firewall is stopped.) after execuing "iptables -L" command.
With Best Regards,
Md. Abdullah-Al Kauser
Aia
2
run again
[root@nntest1 ~]# service iptables stop
You might wanna check the
cat /etc/sysconfig/iptables
When you stop the iptables it should be OK. The output of what you see is basically the rules which would be used by iptables when its on.
For real time monitoring of iptables when they are on use iptstate
[root@XXXXXX ~]# iptstate
IPTables - State Top
Version: 1.4 Sort: SrcIP s to change sorting
Source Destination Proto State TTL
172.20.128.3 224.0.0.1 igmp 0:08:37
172.20.128.8:138 172.20.131.255:138 udp 0:00:03
172.20.128.15:137 172.20.131.255:137 udp 0:00:03
172.20.128.16:137 172.20.131.255:137 udp 0:00:09
172.20.128.17:137 172.20.131.255:137 udp 0:00:04
172.20.128.24:137 172.20.131.255:137 udp 0:00:29
172.20.128.102:137 172.20.131.255:137 udp 0:00:06
172.20.128.147:137 172.20.131.255:137 udp 0:00:04
172.20.128.206:12669 255.255.255.255:5246 udp 0:00:22
172.20.128.228:33962 172.20.131.255:137 udp 0:00:04
172.20.128.228:137 172.20.131.255:137 udp 0:00:04
172.20.128.228:42240 172.20.131.255:137 udp 0:00:16
172.20.128.228:46393 172.20.131.255:137 udp 0:00:04
172.20.128.228:43762 172.20.131.255:137 udp 0:00:11
172.20.128.228:54193 172.20.131.255:137 udp 0:00:04
172.20.128.228:43734 172.20.131.255:137 udp 0:00:11
172.20.128.228:53262 172.20.131.255:137 udp 0:00:16
172.20.128.228:37373 172.20.131.255:137 udp 0:00:16
172.20.128.228:45045 172.20.131.255:137 udp 0:00:11
172.20.128.235:137 172.20.131.255:137 udp 0:00:22
172.20.129.58:138 172.20.131.255:138 udp 0:00:00
172.20.129.84:137 172.20.131.255:137 udp 0:00:06
172.20.129.181:137 172.20.131.255:137 udp 0:00:28
172.20.129.231:53216 255.255.255.255:53216 udp 0:00:04
172.20.129.231:137 172.20.131.255:137 udp 0:00:22
172.20.129.231:53213 255.255.255.255:53213 udp 0:00:23
172.20.130.12:137 172.20.131.255:137 udp 0:00:10
172.20.130.55:11886 255.255.255.255:5246 udp 0:00:11
172.31.224.17:57706 172.20.129.164:22 tcp ESTABLISHED 119:59:59