Re: NAPT with loab balance does not work with iptables 1.2.11, RHEL 3

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

 



Hello,

Mahmoud Aghapour a écrit :

I want to use iptables to translate incoming destination port 500 to
10000-10009 with (round robin or any other method) load balancing.
I used the following command in RHEL 3 with iptables 2.11:
Iptables -A PREROUTING -p tcp --dport 500 -j DNAT --to :10000-10009

But always port 10000 are used for translation and other ports never used.

DNAT (and SNAT, I guess) does "load balancing" only with IP addresses, not with ports. It will use always the first port in the interval unless the resulting connection collides with an existing connection. Only in this case it will try the next port in the interval, and so on...

Since your port interval is rather short, you may try to do load balancing with the 'nth', 'random', or 'statistic' match and one rule per destination port.



[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