View iptables status

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat View iptables status
# 1  
Old 09-26-2014
View iptables status

I want to know whether my iptables are running or not currently.

When I use below command, i get the output.

Code:
[root@nntest1 ~]# service iptables status
Firewall is stopped.

But if i use below commands, then i don't get the output.

Code:
[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
# 2  
Old 09-29-2014
run again
Code:
[root@nntest1 ~]# service iptables stop

# 3  
Old 10-03-2014
You might wanna check the

Code:
cat /etc/sysconfig/iptables

# 4  
Old 10-04-2014
Status of 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

Code:
[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

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to see the status of all the ftp put & get files logs and curent ftp transfer status ?

How to see the status of all the ftp put & get files logs and curent ftp transfer status if any active ftp running in the background ? (2 Replies)
Discussion started by: i4ismail
2 Replies

2. Programming

How to track table status delete/update/insert status in DB2 V10 z/os?

Dear Team I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update ) Scenario We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)
Discussion started by: Perlbaby
1 Replies

3. What is on Your Mind?

Moving from Desktop View to Mobile View

See attached video for a demo on how to move back and forth from the desktop view to the mobile view. Currently this only works for the home page, but I will work on some new PHP code in the future to make this work with the page we are currently on. Edit: The issue with making every page ... (2 Replies)
Discussion started by: Neo
2 Replies

4. Solaris

Need to view all DB

Hi Gurus, How to view only a database files on solaris. Please do a reply at the earliest. Thanks | P.Bharathiraja (2 Replies)
Discussion started by: bharathiraja
2 Replies

5. UNIX for Dummies Questions & Answers

302 server status code to 301/404 server status code

Hello, Sorry for my english. I have an arcade site. mydomain.com/game.html If database has the game name is good. mydomain.com/fd43f54.html if database has not the game name redirect to mydomain.com by 302 error code. if database has not the game name i want a 301/404 error code and no... (0 Replies)
Discussion started by: hoo
0 Replies

6. UNIX for Dummies Questions & Answers

How to view my IP

I run Ubuntu server 7.04, to learn some *nix. I set up LAMP, DNS and FTP but I don't know how to view my ip. now I tried ifconfig but that didnt tell me what I wanted to know. so by what way can I do this without a gui and a website like ipchicken? (14 Replies)
Discussion started by: blowFish@ubuntu
14 Replies

7. Red Hat

Installing RedHat 8.0 onto Dell PowerEdge SC1425 - hdc: status error: status = 0x58

I have successfully installed RedHat 8.0 onto a Dell PowerEdge SC1425 today. This server has two SATA hard drives, and an IDE DVD-ROM drive. Using the following kernel parameters, i successfully installed across both hard drives from CD: ide0=0x1f0,0x3f6,14 vga=791 resolution=1024x768 expert... (5 Replies)
Discussion started by: fishsponge
5 Replies

8. Shell Programming and Scripting

check the status and send an email with status

Hi, We have a text file which has the following data. ISA~00~ ~00~ ~ZZ~VISTN ~ZZ~U1CAD ~051227~183 7~U~00200~000011258~0~P~< GS~FA~EE05J~U1CAD~051227~1831~000011258~X~002002 ST~997~0001 AK1~SH~247 AK2~856~2470001 AK5~A AK2~856~2470002 AK5~A... (3 Replies)
Discussion started by: isingh786
3 Replies

9. UNIX for Dummies Questions & Answers

Couldn't open status file /var/samba/STATUS.LCK

I believe i have most of samba configured right but i get this error each time time try to run it. I was given suggestion that i touch the file, i did, but i still cannot rid myself of this error. Any suggestions (2 Replies)
Discussion started by: macdonto
2 Replies
Login or Register to Ask a Question