From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@lists.netfilter.org
Subject: Re: Masquerade based on skb->mark ?
Date: Fri, 27 Apr 2007 20:23:32 +0200 [thread overview]
Message-ID: <46323FA4.2070705@plouf.fr.eu.org> (raw)
In-Reply-To: <46310B2D.5050102@candelatech.com>
Hello,
Ben Greear a écrit :
>>
>>>>> iptables -A POSTROUTING -t nat -j MASQUERADE -m mark --mark 10001
>>>>> iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 10001
>>>>> iptables -t mangle -A PREROUTING -i eth2 -j MARK --set-mark 10001
[...]
> If virtual router 1 is routing pkts from 1.1.1.1 to 2.2.2.2,
> and virtual router 2 is routing pkts from 1.1.1.1 to 2.2.2.2, and I
> only want to NAT pkts leaving virtual router 1, then I think I
> have to somehow force different ct tuples based on which virtual
> router the pkts are flowing through. I was trying to do this by
> MARKing packets entering a device in a particular virtual router
> and using the mark as part of the tuple....
From what you wrote I understand you need a sort of separate connection
tracking for each "virtual router". But I am afraid it cannot be done
with MARK, because packet classification by the connection tracking
takes place before the packet reaches the mangle PREROUTING (or OUTPUT)
chain.
prev parent reply other threads:[~2007-04-27 18:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-25 3:06 Masquerade based on skb->mark ? Ben Greear
2007-04-26 18:51 ` Jan Engelhardt
2007-04-26 19:20 ` Ben Greear
2007-04-26 19:24 ` Jan Engelhardt
2007-04-26 20:27 ` Ben Greear
2007-04-27 6:24 ` Jan Engelhardt
2007-04-27 18:23 ` Pascal Hambourg [this message]
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=46323FA4.2070705@plouf.fr.eu.org \
--to=pascal.mail@plouf.fr.eu.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.