On Fri, 6 Nov 2009, Simon Horman wrote:
> I also wonder if a different approach could work. Assuming that
> the connection from the real-server doesn't need to be load-balanced,
> I wonder if an iptables rule could be constructed such that
> the real-server just directly connects to itself when accessing the VIP.
iptables -t nat -I OUTPUT -p tcp -d $VIP --dport 80 -j DNAT --to-destination
$IP:80
where $IP = primary IP address of real server
I use LVS-DR with the VIP only configured on the LVS director and iptables
rules on the real servers. The iptables rule above is what I use to allow the
real server to connect to itself when accessing the VIP.
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
|