From: "Jörg Lübbert" <j.luebbert@login-lanstation.de>
To: netfilter@vger.kernel.org
Subject: Re: CONNMARK udp comprehension question
Date: Tue, 27 Nov 2007 02:35:20 +0100 [thread overview]
Message-ID: <474B7458.1090307@login-lanstation.de> (raw)
In-Reply-To: <474B2C65.1060706@endian.com>
This might help you without the need to mess with marks.
For each uplink interface with an incremental $x
ip route add default via $gateway_ip dev $uplink_interface table $x
ip rule add from $ip_of_interface dev $uplink_interface table $x
alternatively use -j CONNMARK --restore-mark in -t mangle PREROUTING so
that ip rules can match the mark or as a 3rd option use the ROUTE target.
- Jörg
Peter Warasin schrieb:
> Hi List
>
> Have a question in order to understand if i am tilting at windmills or
> if there's an issue with my setup.
>
> Here a short description of my scenario to help me to explain myself:
>
> I have a box with multiple uplinks running openvpn in udp mode. One of
> the uplinks has the default gateway (no multipath route). Now, whenever
> i connect to an uplink which actually hasn't the default gateway,
> packets go in through that device and exit through another (due to the
> default gateway), which will break the udp-"connection".
>
> Now, the question:
> I mark all connections entering a specific uplink with a number using
> CONNMARK, in order to be able to distinguish them and make them leave
> the correct interface using fwmark based ip rules.
>
> Shouldn't now the CONNMARK target, mark the connection in such a manner
> that the udp packets coming in have the same mark as the udp packets
> going out whenever they belong to the same "connection"?
> Or is this just not possible due to the connection-less nature of udp?
>
> Same setup works for me with tcp and it also works with udp when the
> connections going through the box (FORWARD).
>
> Kernel is RH'L5.1's kernel-2.6.18-53 with all relevant options enabled
> and iptables 1.3.8.
>
> Any help would be greatly appreciated!
>
> peter
>
next prev parent reply other threads:[~2007-11-27 1:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-26 20:28 CONNMARK udp comprehension question Peter Warasin
2007-11-26 21:02 ` Martijn Lievaart
2007-11-27 1:35 ` Jörg Lübbert [this message]
2007-11-30 16:50 ` Peter Warasin
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=474B7458.1090307@login-lanstation.de \
--to=j.luebbert@login-lanstation.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox