[Pacemaker] Configuring cluster with ports

David McCurley mac at fabric.com
Thu Mar 10 10:37:18 EST 2011

Okay, so assuming the VIP travels with the active server, one idea would be to have an iptables rule on each server that does a local redirect:

On the 8081 machine:

iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport 8080 -j REDIRECT --to-ports 8081

And on the 8082 machine:

iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport 8080 -j REDIRECT --to-ports 8082

----- Original Message ----- 

From: "tariq fillah" <tariqfcb at gmail.com> 
To: pacemaker at oss.clusterlabs.org 
Sent: Thursday, March 10, 2011 6:03:51 AM 
Subject: Re: [Pacemaker] Configuring cluster with ports 

Sorry, the image doesn't appear in the first mail, I attached it to this one. 

2011/3/10 tariq fillah < tariqfcb at gmail.com > 

Hello the list, 

I have to make a cluster with two servers, having the architecture in the image bellow 

The two severs share a virtual IP (VIP), and when we call the VIP in port 8080 VIP:8080, it must be redirected to the first server (if active) on port 8081 or to the second (if active) on port 8082 (IP1:8081 or IP2:8082). 
How is it possible to tell pacemaker the ports that we need to redirect the request to. 

Thanks in advance. 

Pacemaker mailing list: Pacemaker at oss.clusterlabs.org 

Project Home: http://www.clusterlabs.org 
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf 
Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker 

More information about the Pacemaker mailing list