LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Masqueraded packets nor arriving on real server

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Masqueraded packets nor arriving on real server
From: Pieter Temmerman <ptemmerman.ext@xxxxxxxxx>
Date: Wed, 12 Nov 2008 09:08:03 +0100
On Wed, 2008-11-12 at 15:01 +1100, Con Tassios wrote: 
> I use exact same thing with LVS-DR.  One web server instance listens on port
> 81, another one on port 82 etc.  The real server redirects VIP1:80 to 
> localhost
> port 81, VIP2:80 to localhost port 82.
> 
> iptables -t nat -A PREROUTING -i bond0 -p tcp -d $VIP1 --dport 80  -j 
> REDIRECT --to-port 81
> iptables -t nat -A PREROUTING -i bond0 -p tcp -d $VIP2 --dport 80  -j 
> REDIRECT --to-port 82

Hey guys. Thanks for the quick replies.
The solution works perfectly.
However, just out of curiosity, why is the "masq" mode not working? 
What is it that I'm doing wrong? 

my ldirectord.cf:

checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual=172.18.0.173:80
        real=172.18.0.39:81 masq
        real=172.18.0.40:81 masq
        fallback=127.0.0.1:80 gate
        service=http
        checkport=81
        protocol=tcp
        request="ldirector.html"
        receive="Test Page"
        scheduler=rr
        checktype=negotiate

Thanks!


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