LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

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

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
Code:
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
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 3,079
Blog Entries: 4

Rep: Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745
try
Code:
iptables -L -n
 
Old 12-31-2012, 10:00 AM   #3
bijo505
Member
 
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
--
Thanks,
Bijo

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

Rep: Reputation: 233Reputation: 233Reputation: 233
# 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.
 
  


Reply


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


All times are GMT -5. The time now is 10:04 PM.

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