From: Alexei Ustyuzhaninov <alust@alust.homeunix.com>
To: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
Cc: netfilter@vger.kernel.org
Subject: Re: fwmark iptables/ip routing interaction question
Date: Sat, 17 May 2008 09:53:37 +0600 [thread overview]
Message-ID: <482E56C1.2070508@alust.homeunix.com> (raw)
In-Reply-To: <482DA25D.70703@plouf.fr.eu.org>
Pascal Hambourg wrote:
> Hello,
>
> Alexei Ustyuzhaninov a écrit :
>>>
>>>> I have a weird with the same scenario: after rerouting a packet goes
>>>> out through another interface but keeps the source address of the
>>>> original interface.
>>>
>>> Yes that is ... how the code is currently written it seems.
>
> The source address is chosen before the packet is sent to the OUTPUT
> chains, and cannot be changed by the rerouting code, this would break
> things such as connection tracking. It requires stateful NAT so the
> correct original address is put back in replies. By the way, DNAT in the
> OUTPUT chain used to implicitly change the source address when the new
> destination address caused the output interface to change until kernel
> 2.6.11.
Hm. That's not clear to me as I don't know the destination address in
advance (and don't want to change it). Anyhow this solution is obsolete
as I see.
>> Well, maybe you can suggest how to work around this? :) I tried snat,
>> but this solution seems not to work.
>
> SNAT should work on packets creating a new connection (i.e. in the state
> NEW).
Yes, really! The SYN packet goes out through the right interface with
the right source address, SYN/ACK comes back and that's all, nothing
will happen more.
Anyhow isn't this problem unresolvable in general? I just want a simple
thing: to send mail via one provider and all other traffic via the other
provider,
--
Thanks,
Alexei
next prev parent reply other threads:[~2008-05-17 3:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 14:36 fwmark iptables/ip routing interaction question pthyseba
2008-05-07 15:04 ` Jan Engelhardt
2008-05-11 16:23 ` Alexei Ustyuzhaninov
2008-05-11 17:39 ` Jan Engelhardt
2008-05-11 17:50 ` Alexei Ustyuzhaninov
2008-05-16 15:03 ` Pascal Hambourg
2008-05-17 3:53 ` Alexei Ustyuzhaninov [this message]
2008-05-17 10:49 ` Pascal Hambourg
2008-05-17 12:37 ` Alexei Ustyuzhaninov
2008-05-17 23:26 ` Pascal Hambourg
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=482E56C1.2070508@alust.homeunix.com \
--to=alust@alust.homeunix.com \
--cc=netfilter@vger.kernel.org \
--cc=pascal.mail@plouf.fr.eu.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