Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: netfilter@lists.netfilter.org
Subject: Re: Where the de-SNAT actually takes place?
Date: Wed, 23 Aug 2006 13:43:41 +0200	[thread overview]
Message-ID: <echf05$tib$1@sea.gmane.org> (raw)
In-Reply-To: <44E74CA0.9080808@gazeta.pl>

On 19-08-2006 19:38, longraider wrote:
> Hi
...
> And all that I want to do is ingress queuing using IMQ. I want to fwmark
> packets according to their de-SNATed destination adress (and some other
> things also), and then put them into the IMQ ingress queue.
> I could use the packet matching available in the ingress queue itself
> (by ip tool), but I don't know if the packets that go into IMQ are
> de-SNATed or not.

IMQ can be configured, at which point of the traversal packets 
should be send to an IMQ pseudo-device (e.g. imq0). This diagram 
shows default variant (so called BA - Before PREROUTING - After 
POSTROUTING), which in my opinion isn't appropriate for common 
nat situations. So try to recompile your kernel after changing 
IMQ config to AB variant and it will see de-nated adresses both 
incoming (-j IMQ in PREROUTING) and outgoing (-j IMQ in 
POSTROUTING - beter don't use one imq device for both).

> So, where the de-SNAT actually takes place?

But you rather should use tc filter then (on imq it is egress 
always). MARK (fwmark) will see incoming packets de-nated only 
begining from FORWARD or INPUT so to use it like you planed, you 
should add IMQ rule for incoming packets in POSTROUTING, which is 
impractical (and excludes INPUT part).

Jarek P.



  parent reply	other threads:[~2006-08-23 11:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-19 17:38 Where the de-SNAT actually takes place? longraider
2006-08-21 14:51 ` Pascal Hambourg
2006-08-23 11:43 ` Jarek Poplawski [this message]
2006-08-23 12:06   ` Jarek Poplawski

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='echf05$tib$1@sea.gmane.org' \
    --to=jarkao2@o2.pl \
    --cc=netfilter@lists.netfilter.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