Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "John A. Sullivan III" <john.sullivan@nexusmgmt.com>
To: Fabian Hartmann <realdeal@realdealz.ch>
Cc: Saeed Zamani <szamani@tavanesh.com>, netfilter@lists.netfilter.org
Subject: Re: Need help on NAT
Date: Tue, 10 Feb 2004 07:17:37 -0500	[thread overview]
Message-ID: <1076415456.2018.16.camel@ca.gts.nexusmgmt.com> (raw)
In-Reply-To: <1076414843.4028c97b900c7@www.realdealz.ch>

On Tue, 2004-02-10 at 07:07, Fabian Hartmann wrote:
> hi Saeed
> There is an iptables patch called "nth" which allows you to match every Nth
> packet encountered. 
> That includes load-balancing such as you desire like every 4 received packet, 
> SNAT first to the ip of ISP1, the other three to the ip of ISP2.
> 
> i. e.:  iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 \
>              --every 4 --packet 0 -j SNAT --to-source $ISP1
>         iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 \
>              --every 4 --packet 1 -j SNAT --to-source $ISP2
>         iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 \
>              --every 4 --packet 2 -j SNAT --to-source $ISP2
>         iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 \
>              --every 4 --packet 2 -j SNAT --to-source $ISP2
> 
> have a look at this
> http://cvs.netfilter.org/patch-o-matic-ng/nth/help?rev=1.2
> 
> It is available in the netfilter patch-o-matic base repository
> 
> ---
> Fabian Hartmann
> 
> realdeal@realdealz.ch
> www.realdealz.ch
That's much better than my suggestion! How does it interact with
conntrack? Will packets that belong to an existing session also be load
balanced? Thanks - John
-- 
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com



  reply	other threads:[~2004-02-10 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-05  7:18 Need help on NAT Saeed Zamani
2004-02-10 10:55 ` John A. Sullivan III
2004-02-10 12:07 ` Fabian Hartmann
2004-02-10 12:17   ` John A. Sullivan III [this message]
2004-02-10 19:34   ` Saeed Zamani
2004-02-10 20:34   ` Saeed Zamani

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=1076415456.2018.16.camel@ca.gts.nexusmgmt.com \
    --to=john.sullivan@nexusmgmt.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=realdeal@realdealz.ch \
    --cc=szamani@tavanesh.com \
    /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