CARP for third-party machines ?

Started by toxic, March 29, 2021, 02:15:08 PM

Previous topic - Next topic
Hello,

I'm fairly new to HA, but I've managed to setup a failover opnSense router (that's simple as hell, thanks opnSense community !) using CARP, I have two opnSense VMs running on 2 distinct proxmox hosts, and if I shutdown one, the second takes over, very good !

I'm now looking to do something similar for my container running traefik (mainly as a proxy) : IMy idea is to Portforward wan trafic to a VIP, and have opnSense assign this VIP to one or the other of the hosts depending on which one is available.

I'm not sure I'm willing to setup CARP on the CT itself (wouldn't know where to start, all I did was the nice opnSense gui...), but my setup being quite simple, I could tell opnSense : if the opnSense main node is master on the gateway VIP, then the main traefik should have the proxy-VIP, and if the failover opnSense has the CARP gateway VIP, then the failover proxy-IP should be the one that the proxy VIP points to.

Is there a way to do this in opnSense ? Or do I need to dig into each CT to insure they grab the VIP when necessary ?

Thank you in advance for any help !