From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@lists.netfilter.org
Subject: Re: Could policy routing with fwmark be applied to locally generated packet ?
Date: Fri, 23 Jun 2006 12:48:24 +0200 [thread overview]
Message-ID: <449BC6F8.2000205@plouf.fr.eu.org> (raw)
In-Reply-To: <02BB8A4AC86C564C89C7F14CF98CE0C40127AF@knowledge.wizdom.nu>
Hello,
Sietse van Zanen wrote :
>
> dog daemon wrote :
>>
>> The question is could we use netfilter fwmark to mark locally generated
>> port 80 packet (http) to certain fwmark(ex. 0x20), and route them to
>> wireless route, but keep the default gw being 10.5.30.254?
Yes, of course.
>> I have tested the following environment but it seemed that the packets
>> was be routed to the correct route, but had the incorrect source
>> address(the address of eth0).
[...]
>> I think that output routing decision was done before "OUTPUT" chain in
>> mangle table, and the outgoing address was already chosen
That's correct.
>> Is there another way to fit this requirement or am i missing
>> something(documentation) ?
>
> I think you only need to add a simple SNAT rule to change the source IP
> to 192.168.3.10
Yes. Avoid MASQUERADE which does not always work as expected when in
conjunction with advanced routing.
The mark set for alternate routing can be reused to match the
connections which need to be SNATed.
> Or there might be some ip_if_group option is /proc/sys/net to have
> local outgoing packets always use the source address of the interface
> the are leaving. Not sure about Linux, but Solaris has such an option in
> the kernel.
IMHO such behaviour would be total nonsense.
next prev parent reply other threads:[~2006-06-23 10:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-23 9:46 Could policy routing with fwmark be applied to locally generated packet ? dog daemon
2006-06-23 9:56 ` Sietse van Zanen
2006-06-23 10:48 ` Pascal Hambourg [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-06-23 9:43 dog daemon
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=449BC6F8.2000205@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.