Re: netfilter Digest, Vol 9, Issue 4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Pablo Neira <pablo@xxxxxxxxxxx>
> Subject: Re: Load balancing.
> To: szpak <xperience@xxxxxxxxxx>
> Cc: netfilter@xxxxxxxxxxxxxxxxxxx
> Message-ID: <425056ED.3010104@xxxxxxxxxxx>
> 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
> >                           |          128.0.0.0/30
> > <MY NET>---->[Linux NAT]-------- ISP2
> > 192.168.0.0/24     |      80.0.0.0/30
> >                            ------ ISP3
> >                                    85.0.0.0/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.
> 
> http://lartc.org/howto/
> 
> --
> Pablo
> 
> ------------------------------

I found this rule in a book :

iptables -t nat -A PREROUTING -i eth0 -o eth1 -d 192.0.34.72 -j dnat
--to-destination 192.168.1.2-192.168.1.4

you can replace populate a variable, PC_LB, with the ip addresses of the ISPs.

Regards,
Visham


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux