RE: Failover IP router

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-
bounces@xxxxxxxxxx] On Behalf Of Barry Brimer
Sent: Tuesday, November 27, 2007 3:35 PM
To: General Red Hat Linux discussion list
Subject: Re: Failover IP router

Quoting Steven Buehler <steve@xxxxxxxxxxxx>:

I have been googleing for this, but can't seem to find the right
What I am trying to do is to create a failover router on a redhat
1. will be on 2 servers
2. has one IP address
3. redhat box router will have the 1 IP address for on
4. server1 will be on
5. server2 will be on
6. If server1 fails, server2 will take over.

We are not worried about cookies that have been set on server1 to be
to server2. We are just worried about the second machine taking
over. What
would be better is if it could be a load balancing setup so that it
will use
both servers, but if one fails, people will not notice it because the
server will then be taking all of the requests.

I have googled for "Linux failover iptables router" and a few other
combinations of words, but what I keep finding is failover for the
connections. Having 3 Nic cards 1 going to one ISP, 1 going to
another ISP
and one going to the internal network. Maybe I am just using the
wording. Any url links for instructions would be appreciated.

Thank You

I believe that you are looking for the load balancing portion of Red
Hat Cluster
Suite <>


I found a page at that says to use
the following in the iptables:
-A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m nth
--counter 0 --every 4 --packet 0 \
-j DNAT --to-destination
-A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m nth
--counter 0 --every 4 --packet 1 \
-j DNAT --to-destination
-A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m nth
--counter 0 --every 4 --packet 2 \
-j DNAT --to-destination
-A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m nth
--counter 0 --every 4 --packet 3 \
-j DNAT --to-destination

But I get errors because of the "-m nth". Because the servers are already
setup, I was hoping that I wouldn't need to redo them for something like the
RedHat Cluster Suit. That would require a re-install of the OS wouldn't it?
I have never done the RH CS before and they are wanting this all done for a
demo on Monday. Because of time constraints for the demo, I was hoping on
something like the above that could just go into my iptables firewall.
After the demo, we could go for something more elaborate like an appliance.


redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe