Is there a decent carp failover how-to/tutorial?



  • ive looked through the tutorials and how-to's but i cant find anything about what im trying to do. im new to this so forgive my ignorance. i found a lot of literature on setting up multiple pfsense boxes etc. but what i am trying to do is:
    there are 2 servers (mostly for web, port 80) on my network. one is the primary server… the other one is just a backup using database replication and rsync'ing the web directories... this keeps the backup always up to date with the primary server. i would like to configure pfsense to point at the primary server, and then if the primary server is off line (ONLY if it is offline, no load-balancing) point at the backup-server, automatically going back to the primary server (master) when it becomes available again.

    in essence i would like to setup the backup server as a failover in the case that the primary server is not available (maybe its unplugged, crashed, down for maintenance, port on a switch went bad, etc). i know very little on this topic but from what ive been able to find CARP is what im looking for. i would like to find a decent how-to or tutorial for configuring this, but as ive said most of what ive been able to find is for redundancy between two firewalls, as opposed to two separate servers on the single lan.



  • I haven't seen a tutorial for what you are doing. Go into services, load balancer, virtual servers and poke around. It's not too hard to figure out.



  • i have played around in there before and i was able to configure load balancing, but could not get it to failover. load balancing between the two servers on my lan is counter productive for me, i need one of them to only be used in a "worst case scenario" (absolutely no response from the primary server). also in the pool setup it requires you to enter your wan IP that you want it to listen on. i only have one wan ip, and it is not static, so putting a value there would still require me to go in and change the wan ip every time i get leased a new one, resulting in more work and less up-time then if i didn't do it at all.

    i really hope that there is a way to do what i want to do with pfsense. if anyone else has suggestions please feel free…



  • i need one of them to only be used in a "worst case scenario" (absolutely no response from the primary server).

    There is the field

    "Pool Down Server"
    NOTE: This is the server that clients will be redirected to if ALL servers in the pool are offline.

    which does exactly what you want.
    The pool can consists of only one server (your primary one), and the fallback is configured here.



  • thank you for your help, the only problem left is when setting up the pools its required to put my WAN ip in, if i dont have a static ip what can i do?

    thanks!
    kyle



  • You could put a dumb off-the-shelf router in NAT mode in front of the pfSense.
    Or if the modem supports that, reconfigure the modem.

    Basically put a static, private subnet in front of the pfSense.


Locked