From: Erik Slagter <erik@slagter.name>
To: netdev@vger.kernel.org
Cc: rpartearroyo@albentia.com
Subject: Re: stateless nat *please* tell me how I'm supposed to use it
Date: Mon, 23 May 2011 14:12:36 +0200 [thread overview]
Message-ID: <4DDA4F34.8070309@slagter.name> (raw)
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
Hi everybody,
I am a little disappointed that nobody can or wants to tell me how
stateless nat is supposed to be used. As no other documentation exists
on this subject, this gives the impression this knowledge is a secret?
For people that run into the same problem, I can tell that I've found
the solution, with help from Rodrigo Partearroyo González. The key is
that packet munging on this level is only useful if performed before
routing and as the (normal) egress qdisc is called only just before the
handing the packet to the device, the stateless nat is performed by the
"ingress" qdisc and so the nat action / filter needs to be attached to
the, to be added, tc ingress qdisc. And then it works, e.g.
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol ip prio 10 u32 match ip src
1.2.3.4 action nat egress 1.2.3.4/32 5.6.7.8
I guess the "pedit" and related actions work alike.
Now I am still wondering what the "tc action" syntax is for.
Erik Slagter.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5110 bytes --]
next reply other threads:[~2011-05-23 12:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 12:12 Erik Slagter [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-16 13:55 stateless nat *please* tell me how I'm supposed to use it Erik Slagter
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=4DDA4F34.8070309@slagter.name \
--to=erik@slagter.name \
--cc=netdev@vger.kernel.org \
--cc=rpartearroyo@albentia.com \
/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;
as well as URLs for NNTP newsgroup(s).