Skip to contentSkip to conversation

failover with iptables?

DISCUSSION Roy Sigurd Karlsbakk 4 participants 6 messages Sep 11, 2002

lore
Share & tools
lore
#0 lore raw

hi

I currently have two identical servers I want to use in parallel with an iptables gate in front of them, so if one chrashes, iptables just sorts out and redirects to the other.

but

is it possible to make the below (as stolen from various cisco sketches) with iptables?

If iptab_1 fails, iptab_2 should take over ip and (perhaps) mac address of iptab_1.

ps: I don't think I need connection tracking.

roy

clients

| |
| |

+----+----+     +----+----+
|         |     |         |
| iptab_1 |     | iptab_2 |
|         |     |         |
+----+----+     +----+----+
     |     \   /     |        
     |      \ /      |
     |       X       |        
     |      / \      |
     |     /   \     |
+----+----+     +----+----+
|         |     |         |
| server1 |     | server2 |
|         |     |         |
+---------+     +---------+
Signature · 6 lines
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.
#1 lore raw
Quoted 8 lines · Roy Sigurd Karlsbakk

hi

I currently have two identical servers I want to use in parallel with an iptables gate in front of them, so if one chrashes, iptables just sorts out and redirects to the other.

but

Quoted 7 lines

is it possible to make the below (as stolen from various cisco sketches) with iptables?

If iptab_1 fails, iptab_2 should take over ip and (perhaps) mac address of iptab_1.

ps: I don't think I need connection tracking.

With this last line included the answer is "yes". Otherwise it's clearly a "no", or at least nothing more than a "partial".

You can failover any linux machine with Heartbeat (www.linuxvirtualserver.org) and create your own custom resource script to failover (the firewall). Failover is by no means stateful though using this technique, so any currently tracked connection will not reach the failover node properly.

Harald Welte hopes to start working on stateful failover early next year, but that's a long way from now, especially since it likely also needs to mature a bit before going into production...

Martijn

#2 lore raw
In reply to Roy Sigurd Karlsbakk
Quoted 8 lines · Roy Sigurd Karlsbakk

hi

I currently have two identical servers I want to use in parallel with an iptables gate in front of them, so if one chrashes, iptables just sorts out and redirects to the other.

If iptab_1 fails, iptab_2 should take over ip and (perhaps) mac address of iptab_1.

Use vrrp for this. The MAC address *is* important too.

Quoted 1 line

ps: I don't think I need connection tracking.

In that case you can do what you want.

In fact, even if you did need connection tracking, you could still do it provided you don't also need NAT.

Antony.

Signature · 7 lines
In science, one tries to tell people
in such a way as to be understood by everyone
something that no-one ever knew before.

In poetry, it is the exact opposite.

 - Paul Dirac
#3 lore raw
Quoted 1 line

Use vrrp for this. The MAC address *is* important too.

hm ...

vrrp is a protocol - right?

do you know where I can find a (good?) implementation for it for linux?

roy

Signature · 6 lines
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.
#4 lore raw
Quoted 5 lines · Roy Sigurd Karlsbakk
Quoted 1 line

Use vrrp for this. The MAC address *is* important too.

hm ...

vrrp is a protocol - right?

Virtual Router Redundancy Protocol.

Connects two or more machines together and implements floating MAC and IP
addresses, which are always attached to a working machine. If one system
dies, or loses network connectivity, the addresses automatically go to another machine so that other system don't know there's anything wrong.

Quoted 1 line

do you know where I can find a (good?) implementation for it for linux?

http://w3.arobas.net/~jetienne/vrrpd

Antony.

Signature · 2 lines
The difference between theory and practice is that
in theory there is no difference, whereas in practice there is.