Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-22-2009, 08:27 AM   #1
LQ Newbie
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
LVS + Piranha + Direct Routing + iptables Problem


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 ?
Old 12-22-2009, 10:34 AM   #2
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Are you sure that rule like: iptables –t nat –A PREROUTING –p tcp –d --dport 80 -j REDIRECT
does exist?
Old 12-22-2009, 10:42 PM   #3
LQ Newbie
Registered: Dec 2009
Posts: 2

Original Poster
Rep: Reputation: 0
its worked for me. Using RHEL 5 update 4


direct, iptables, lvs, piranha, routing

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stuck trying to use Piranha and LVS TheGorf Linux - Networking 2 04-18-2013 04:25 AM
Piranha LVS/TUN support OR alternative web interface for configuring LVS ajitabhpandey Red Hat 0 05-18-2009 09:37 PM
How to protect LVS director server with IPTABLES yaw55555 Linux - Networking 0 04-10-2009 04:21 AM
piranha-gui service fails - (LVS-nat)Fedoracore 6 xxx_anuj_xxx Linux - Networking 0 04-06-2007 01:30 PM
Routing and LVS Mikhail_16 Linux - Networking 3 07-22-2004 02:00 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:03 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration