From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?koi8-r?Q?=F0=CF=CB=CF=D4=C9=CC=C5=CE=CB=CF_?= =?koi8-r?Q?=EB=CF=D3=D4=C9=CB?= Subject: RE: UDP stream load balancing across multiple uplinks Date: Mon, 04 Aug 2008 17:41:26 +0300 Message-ID: <1217860886.4178.27.camel@casper.meteor.dp.ua> References: <000501c8edf5$19903230$4cb09690$@com> <000001c8ee61$67e4b7a0$37ae26e0$@com> <4889ECB9.3090206@riverviewtech.net> <000801c8f0b6$7a804580$6f80d080$@com> <1217834772.4178.7.camel@casper.meteor.dp.ua> <000301c8f63a$00215660$00640320$@com> Reply-To: casper@meteor.dp.ua Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <000301c8f63a$00215660$00640320$@com> Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="koi8-r" To: barich@trisectrix.com Cc: 'Mail List - Netfilter' =F7 =F0=CE=C4, 04/08/2008 =D7 09:57 -0400, Barry A Rich =D0=C9=DB=C5=D4= : > > -----Original Message----- > > From: netfilter-owner@vger.kernel.org > [mailto:netfilter-owner@vger.kernel.org] > > On Behalf Of ??????????? ?????? > > Sent: Monday, August 04, 2008 3:26 AM > > To: barich@trisectrix.com > > Cc: 'Mail List - Netfilter' > > Subject: RE: UDP stream load balancing across multiple uplinks > >=20 > > =F7 =F0=CE=C4, 28/07/2008 =D7 09:33 -0400, Barry A Rich =D0=C9=DB=C5= =D4: > > > > -----Original Message----- > > > > From: netfilter-owner@vger.kernel.org > > > > [mailto:netfilter-owner@vger.kernel.org] > > > > On Behalf Of Grant Taylor > > > > Sent: Friday, July 25, 2008 11:10 AM > > > > > > > > Given that the source IP of your packets can change mid stream,= you > > > > could use the "nth" match extension. Using "nth" you would mat= ch > > > > packets to decide how to mark them and then use the mark to det= ermine > > > > what routing table to use which would ultimately decide which o= utbound > > > > path to use. > > > > > > The following setup does load balancing across the uplinks. Howev= er, the > > > source address in the outgoing packets is not being SNAT'ed. Any > > > suggestions? > >=20 > > Only first packet of udp "connection" is reaching the rule in the n= at > > table and does the job, since nat occurs for all packets in this > > connection rest of rules would not match. >=20 > I understand better. I removed the following rule: >=20 > #iptables -t raw -A PREROUTING -i eth0 -p udp --sport $SPORT -j NOTRA= CK >=20 > The connection is tracked and the outgoing UDP packets are SNAT-ed. H= owever, > the source address for all UDP packets is the IP address of the uplin= k > assigned to the connection (regardless of the uplink they actually ar= e > sent). >=20 > Is there a way to SNAT without connection tracking? Sure: http://linux-ip.net/html/nat-stateless.html --=20 =F0=CF=CB=CF=D4=C9=CC=C5=CE=CB=CF =EB=CF=D3=D4=C9=CB