[lvs-users] Fwd: LVS + Piranha + Direct Routing + iptables Problem

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] Fwd: LVS + Piranha + Direct Routing + iptables Problem
Cc: wensong@xxxxxxxxxxxx
From: Anil Pillai <rcamphor@xxxxxxxxx>
Date: Tue, 5 Jan 2010 10:33:27 +0530

I was able to implement LVS with Direct Routing (iptables).
I am facing a problem while using the iptables which requires

iptables enrty on Real servers like this (iptables –t nat –A PREROUTING –p
tcp –d <VIP> --dport <port> -j REDIRECT).

Below is a brief on the setup:

I have 3 servers Apache installed on all three servers (Port 80).

Server 1 (  -> (VIP) -> running “Pulse”

Server 2 (

Server 3 (

I have configured LVS on port 80.  Added the below iptables entry on &

iptables –t nat –A PREROUTING –p tcp –d --dport 80 -j REDIRECT

With the above setup everything works fine. Even Apache on Server 1 (Which
has the VIP) get the request as part of Load sharing.

But if I add the iptables entry in Server 1 (, Requests are
received only on the Apache installed this host.

The reason for doing this is to implement redundancy. Like in my case I have
implemented the redundant setup on Server 2 ( and once the
“pulse” is stopped on Server 1(, “pulse” is automatically
started on Server 2 ( which acquired the VIP ( But
since iptables is already active with the above entry all the requests are
going to the Apache of same host (

Does anyone faced similar issue ?
Please read the documentation before posting - it's available at: mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to

<Prev in Thread] Current Thread [Next in Thread>
  • [lvs-users] Fwd: LVS + Piranha + Direct Routing + iptables Problem, Anil Pillai <=