From: "Saeed Zamani" <szamani@concept.ae>
To: 'Fabian Hartmann' <realdeal@realdealz.ch>
Cc: netfilter@lists.netfilter.org
Subject: RE: Need help on NAT
Date: Wed, 11 Feb 2004 00:04:32 +0330 [thread overview]
Message-ID: <000501c3f015$54460400$3c23d9d5@Zamani> (raw)
In-Reply-To: <1076414843.4028c97b900c7@www.realdealz.ch>
Thank you all for alternative solutions. Good help for me.
Thanks,
Saeed Zamani.
-----Original Message-----
From: Fabian Hartmann [mailto:realdeal@realdealz.ch]
Sent: Tuesday, February 10, 2004 3:37 PM
To: Saeed Zamani
Cc: netfilter@lists.netfilter.org
Subject: Re: Need help on NAT
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
prev parent reply other threads:[~2004-02-10 20:34 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
2004-02-10 19:34 ` Saeed Zamani
2004-02-10 20:34 ` Saeed Zamani [this message]
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='000501c3f015$54460400$3c23d9d5@Zamani' \
--to=szamani@concept.ae \
--cc=netfilter@lists.netfilter.org \
--cc=realdeal@realdealz.ch \
/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