Re: Need help on NAT

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

 



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@xxxxxxxxxxxx
> 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@xxxxxxxxxxxxx



[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