Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 12-30-2012, 09:41 PM   #1
Senior Member
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
iptables not showing me the rules

I just did a fresh install of Debian Squeeze on my computer and I started setting some iptables rules, I run the command to view the rules like this
iptables -L
I only get the first line for the INPUT chain, and nothing else. I want to see all the rules that I have set but the computer isn't letting me for some reason, It has let me see them before (i re-installed it and in the previous installation it started doing this as well but I am now in a new fresh installation and it is still doing this to me)
what is happening here and how can I fix this to let me see the iptables rules I have set.
Old 12-31-2012, 04:44 AM   #2
LQ Addict
Registered: Jan 2011
Posts: 8,563
Blog Entries: 13

Rep: Reputation: Disabled
iptables -L -n
Old 12-31-2012, 10:00 AM   #3
Registered: Nov 2012
Location: Bangalore
Distribution: Fedora & Ubuntu
Posts: 77

Rep: Reputation: 18
Hi Baronobeefdip,

If you run iptables -L -n, it will show only the content of the default table, ie filter and you can see the INPUT,OUTPUT and FORWARD chains of filter only. If you want to see the details of each table, you need to explicitly specify the table name using -t.

iptables -t <filter/nat/mangle/raw> -L <chain> -n --line-numbers
eg:-iptables -t nat -L -n --line-number

Last edited by bijo505; 12-31-2012 at 10:06 AM.
Old 12-31-2012, 06:19 PM   #4
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 3,180
Blog Entries: 1

Rep: Reputation: 675Reputation: 675Reputation: 675Reputation: 675Reputation: 675Reputation: 675
# iptables -t nat -L
# iptables -t mangle -L
# iptables -t filter -L
# iptables -t raw -L
# iptables -t security -L
# iptables -L

Or just examine what gets created with iptables-save.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables - Anyone using iptables with 50,000+ rules? lrirwin Linux - Networking 1 03-21-2012 06:35 PM
Restore iptables Rules that have been saved with iptables-save tiuz Linux - Security 4 08-14-2010 05:50 PM
Snort rules created to search content in payload it is not showing alerts dalgas Linux - Security 9 05-30-2010 10:20 AM
iptables 1.27a still loading rules after installing iptables 1.3.0 yawe_frek Linux - Software 1 06-07-2007 09:50 PM
iptables -t nat -L not showing all rules alpha-wolf Linux - Networking 0 08-14-2001 06:36 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration