From: Andrew Beverley <andy@andybev.com>
To: "Ethy H. Brito" <ethy.brito@inexo.com.br>
Cc: netfilter@vger.kernel.org
Subject: Re: filter before NAT
Date: Tue, 11 Oct 2011 20:37:52 +0100 [thread overview]
Message-ID: <1318361872.26402.2504.camel@andybev-desktop> (raw)
In-Reply-To: <20111011112453.49d1a3f1@pulsar.inexo.com.br>
On Tue, 2011-10-11 at 11:24 -0300, Ethy H. Brito wrote:
> Hi All.
>
> I am trying to control some outbound traffic thru a Linux NATing box via this:
>
> $TC filter add dev $INTERNET protocol ip parent 3: pref 1 \
> u32 \
> match ip src 192.168.106.2 \
> flowid 3:5602
>
> The problem is that the packets are hooked *after* passing SNAT and all the
> rules can see is the outbound IP. So no redirects to the corresponding
> flowid occur.
>
> Is it possible to make the filter rule above "see" the packets before they
> get NATed?
>
How about marking them using an iptables rule before SNAT? The mangle
table of POSTROUTING sits before the nat table.
Andy
next prev parent reply other threads:[~2011-10-11 19:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 14:24 filter before NAT Ethy H. Brito
2011-10-11 19:37 ` Andrew Beverley [this message]
2011-10-11 19:52 ` Ethy H. Brito
2011-10-12 7:01 ` Nikolay Kichukov
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=1318361872.26402.2504.camel@andybev-desktop \
--to=andy@andybev.com \
--cc=ethy.brito@inexo.com.br \
--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