Redhat LVS (piranha) backend connects itself over VIP
I 've been trying to setup LVS piranha with something different under Redhat enterprise 5
What i want to do is simply;
I have one backend and one LB runs on Direct Routing mode with iptables. I did not use any vip nor arptables for backend (i used on backends, iptables -t nat -A PREROUTING -p tcp -d $VIP --dport 8080 -j REDIRECT)
So in this case, all requests sends by Backend goes to LB:vip (direct routing iptables)
I got 3 servers
Backend1 connects to Backend2 over VIP successfully
Backend2 connects to Backend1 over VIP successfully
But backend1 can not connect to itself over VIP nor Backend2 can not connect to itself over VIP this is what i want to do. Backends should connect itself over VIP.
I thought packages might return with LB ip instead of VIP so i did under the LB;
iptables -t nat -A POSTROUTING -p tcp -o eth1 -j SNAT -s $backend1 --to-source $VIP
but it did not work.
Should i use some other iptables rules or you guys say that it is not gonna work. Or should i use NAT mode instead of Direct routing of LVS?
Any suggestion are appreciate.