From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: Joelly Alexander <alex@joelly.net>
Cc: netfilter@vger.kernel.org
Subject: Re: unable to source and destination nat at the same time on multi-homed server
Date: Sun, 07 Nov 2010 17:10:03 +0100 [thread overview]
Message-ID: <4CD6CF5B.2030606@plouf.fr.eu.org> (raw)
In-Reply-To: <4CD6C4C6.3050508@joelly.net>
Joelly Alexander a écrit :
>
> in other words - source-nat must be done before destination-nat, but
> iptables does not allow this because the output chain with
> destination-nat is handled before the source-nat from the postrouting
> chain;
>
> does anyone know a way to solve this?
You can mark the packets (-j MARK) or the connection (-j CONNMARK) in
mangle/OUTPUT before DNAT, and match the packet mark (-m mark) or
connection mark (-m connmark) in nat/POSTROUTING.
Or you can use -m conntrack --ctorigdst to match the original
destination address.
next prev parent reply other threads:[~2010-11-07 16:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-07 15:24 unable to source and destination nat at the same time on multi-homed server Joelly Alexander
2010-11-07 16:10 ` Pascal Hambourg [this message]
2010-11-10 22:33 ` Joelly Alexander
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=4CD6CF5B.2030606@plouf.fr.eu.org \
--to=pascal.mail@plouf.fr.eu.org \
--cc=alex@joelly.net \
--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 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.