Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Eric B." <ebenze@hotmail.com>
To: netfilter@vger.kernel.org
Subject: Packets not traversing the POSTROUTING table?
Date: Mon, 7 Apr 2008 23:27:24 -0400	[thread overview]
Message-ID: <fteoq6$ipr$1@ger.gmane.org> (raw)

Hi,

I'm running into a strange issue here.  I'm not sure if I have done
something wrong, or if am simply misunderstanding things.

I have added a very simple rule in my POSTROUTING nat table to log all
packets, but the packets I am looking to find don't show up in my log file.
If I initiate the packets from the machine itself, (eg: ping www.yahoo.com),
then I see those packets show up.  However, if the machine is simply
responding to packets from another machine (ex: ping 192.168.101.64 from
another computer), they don't show up in the POSTROUTING table.  I'll see
the packets show up in the log statement from the OUTPUT filter table, but
not in the POSTROUTING nat table.

I was under the impression/understanding that all packets travel through the
POSTROUTING nat table.  Is this incorrect?  Do they only traverse that table
under special circumstances?  Do response packets not traverse the
POSTROUTING table?

# iptables -F
# iptables -t nat -I POSTROUTING -j LOG --log-prefix "POSTROUTE"
# iptables -I OUTPUT -j LOG --log-prefix "OUTPUT"

I've taken a look at http://www.docum.org/docum.org/kptd/ and from what I
can tell, all packets are supposed to traverse the POSTROUTING table...   Am
I missing something obvious here?

From what someone on the comp.os.linux.networking group told me, only the 
nat tables only see the first new packet of every connection, but since ICMP 
is connectionless, does that not mean that every new ping would have to 
travel through the nat table chains?  I added a log rule in the PREROUTE nat 
table and see all the incoming ICMP ping requests; just absolutely nothing 
in the POSTROUTE nat table....

I'm running RHEL 4.2, kernel 2.6.9-67.0.4.ELsmp.

Any help would greatly be appreciated!

Thanks!

Eric




             reply	other threads:[~2008-04-08  3:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-08  3:27 Eric B. [this message]
2008-04-08  9:26 ` Packets not traversing the POSTROUTING table? Jan Engelhardt
2008-04-08 11:42   ` Eric B.
2008-04-08 12:17     ` Jan Engelhardt
2008-04-08 18:15       ` Eric B.
2008-04-08 19:14         ` Jan Engelhardt
2008-04-08 19:28           ` Eric B.
2008-04-08 19:38             ` Jan Engelhardt
2008-04-08 19:44               ` Eric B.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fteoq6$ipr$1@ger.gmane.org' \
    --to=ebenze@hotmail.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox