LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-27-2010, 05:11 PM   #1
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Rep: Reputation: 32
iptables --list does not show pre or postrouting rules


I'm running on RHEL 5

I have a PREROUTING rule that redirects port 443 to port 8443. If I do "iptables --list" or "iptables -v --list" I see only the standard chains listed. As the prerouting rule is the only rule I have, it appears that I don't have any rules.

Is there a way to do a full and true listing of all rules other than "iptables-save"? You might just as well read the iptables file.

BTW when you do an iptables-save it shows something like

:INPUT ACCEPT [123939:493828]
What are those numbers?

Thank you
 
Old 01-27-2010, 05:59 PM   #2
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
You need to specify the table (using -t). By default iptables assumes the 'filter' table. So you want
Code:
iptables -t nat --list
 
1 members found this post helpful.
Old 01-28-2010, 10:25 AM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
You might also want to specify the -v option to make the output more verbose. Examples:
Code:
iptables -nvL
Code:
iptables -nvL -t nat
Quote:
Originally Posted by thllgo View Post
:INPUT ACCEPT [123939:493828]
What are those numbers?
They are packet and byte counters.
 
1 members found this post helpful.
  


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 postrouting SNAT not working - what am I doing wrong? web_janitor Linux - Networking 19 03-18-2024 12:01 PM
Performing IPTABLES postrouting on virtual nic interface jdaniels73 Linux - Software 1 08-02-2006 12:35 PM
Iptables postrouting question phatboyz Linux - Networking 8 01-31-2005 01:58 PM
iptables POSTROUTING doesn't match local-process replies. bentz Linux - Networking 3 03-10-2004 06:34 PM
iptables- how to list all rules? Noerr Linux - Networking 4 06-01-2002 04:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration