I have the following LVS setup:
---
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.16:80 wlc persistent 50
-> 127.0.0.1:80 Local 1 0 0
---
I execute this shell script:
---
VIP=192.168.0.16
iptables -t nat -A POSTROUTING -p tcp -s $VIP --sport 8080 -j SNAT
--to-source $VIP:80
---
Telnetting to the vip (192.168.0.16) port 80 gives me a 'connect failed'
I can see the connection from my .101 machine:
IPVS connection entries
pro expire state source virtual destination
TCP 00:20 NONE 192.168.0.101:0 192.168.0.16:80 127.0.0.1:80
TCP 00:31 SYN_RECV 192.168.0.101:2102 192.168.0.16:80 127.0.0.1:80
Same thing happens when I configure the realserver on 8080(although
from my LVS understanding this doesn't make a difference since we just
dump the packet as is to 127.0.0.1 when using localnode mode).
So, I'm at a loss, does anyone have tips for getting this to work?
Note that I'm using direct route(DR) if this makes a difference. For
the realserver I tried this listening on port 8080(not specifying an
interface) and listening on port 8080/192.168.0.16.
This is kernel 2.6.12 + the latest ipvs-nfct patch(ipvs-nfct-2.6.12-1.diff).
Thanks.
|