LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] IP of web site visitors behind LVS

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] IP of web site visitors behind LVS
From: Graeme Fowler <graeme@xxxxxxxxxxx>
Date: Fri, 13 Feb 2009 13:58:27 +0000
On Fri, 2009-02-13 at 14:53 +0100, Dusan Djordjevic wrote:
> I am testing LVS and using masquerade as routing protocol to send
> requests to real servers. I noticed (which is IMHO normal situation)
> that all requests to web server are sent from IP address of load
> balancer.

This isn't right. LVS-NAT does not change the source IP, it changes the
destination IP.

The inbound traffic flows as follows:

        Client IP
            |
        Virtual IP
<director changes destination>
            |
       Realserver IP

On the way out it goes:

       Realserver IP
            |
 <director changes source>
        Virtual IP
            |
        Client IP

If your setup is somehow making the source IP be the director, then
either you have something configured incorrectly or you have something
acting at L7 as opposed to L4, like an Apache or Squid reverse proxy.

Perhaps seeing the config from your director would be helpful here.

Graeme


_______________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>