netfilter Digest, Vol 9, Issue 4
vishamr2000 at gmail.com
Mon Apr 4 09:19:54 CEST 2005
> From: Pablo Neira <pablo at eurodev.net>
> Subject: Re: Load balancing.
> To: szpak <xperience at interia.pl>
> Cc: netfilter at lists.netfilter.org
> Message-ID: <425056ED.3010104 at eurodev.net>
> Content-Type: text/plain; charset=us-ascii; format=flowed
> szpak wrote:
> > Hello.
> > I need help with I think something very easy to do with Iptables.
> > I need to have load balancing via nat for two or more ISP as in chart:
> > ------ ISP1
> > | 220.127.116.11/30
> > <MY NET>---->[Linux NAT]-------- ISP2
> > 192.168.0.0/24 | 18.104.22.168/30
> > ------ ISP3
> > 22.214.171.124/30
> > I have some users on my side and I want them to simply load balance trafic
> > from them via those three ISP's. How to do that, is there a way to have three default static routes?
> This is not related to iptables itself. Have a look at iproute.
I found this rule in a book :
iptables -t nat -A PREROUTING -i eth0 -o eth1 -d 126.96.36.199 -j dnat
you can replace populate a variable, PC_LB, with the ip addresses of the ISPs.
More information about the netfilter