REDIRECT to more than one port does not work

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

 



Hi,

I would like to forward tcp connection to port 8000 to ports 8080 and 8081 on
the same machine in order to load balance HTTP request to two processes. So
I'va add the following rule

iptables -t nat -A  PREROUTING -p tcp --dport 8000 -m state --state NEW -j
REDIRECT --to-ports 8080-8081

I think that the first connection will be forwarded to 8080 and the sencond to
8081 and so on. But when I connect to the port 8000 the connection is always
redirected to the same port 8080.

Is my thought wrong ?

regads, olivier.

here is some information on my linux box
# uname -a
Linux mowgli.lannion.citypassenger.com 2.4.20-8 #1 Thu Mar 13 17:18:24 EST 2003
i686 athlon i386 GNU/Linux
# iptables --version
iptables v1.2.7a



[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