LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

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

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


Hi,

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 (10.50.57.22) -> 10.50.57.55 (VIP) -> running “Pulse”
Server 2 (10.50.57.40)
Server 3 (10.50.57.48)

I have configured LVS on port 80. Added the below iptables entry on 10.50.57.40 & 10.50.57.48
iptables –t nat –A PREROUTING –p tcp –d 10.50.57.55 --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 (10.50.57.22), 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 (10.50.57.40) and once the “pulse” is stopped on Server 1(10.50.57.22), “pulse” is automatically started on Server 2 (10.50.57.40) which acquired the VIP (10.50.57.55). But since iptables is already active with the above entry all the requests are going to the Apache of same host (10.50.57.40).

Does anyone faced similar issue ?
 
Old 12-22-2009, 10:34 AM   #2
nimnull22
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 10.50.57.55 --dport 80 -j REDIRECT
does exist?
 
Old 12-22-2009, 10:42 PM   #3
rcamphor
LQ Newbie
 
Registered: Dec 2009
Posts: 2

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


Reply

Tags
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


All times are GMT -5. The time now is 08:18 AM.

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