OPNsense Forum

English Forums => High availability => Topic started by: adn77 on June 29, 2022, 03:15:17 PM

Title: [Solved] Failover via Routing distance
Post by: adn77 on June 29, 2022, 03:15:17 PM
I created two routes to the same subnet using two different remote (VPN) gateways.
In Linux a distance parameter can be added for preferring one route over the other.

Is this possible as well or do I have to setup a Gateway group and try the counter-intuitive way via Firewall rules?

Or do I even have to setup a proper routing protocol?
Title: Re: Failover via Routing distance
Post by: adn77 on July 14, 2022, 04:26:45 PM
I am going to answer myself...

Looks like in FreeBSD it is not possible to add a second route to the same subnet:
fib 0: route already in table

Hence one has to use a proper routing protocol or use policy based routing.

I opted for the latter by performing these steps:

The connectivity to the remote network was interrupted for a few minutes (I guess due to some firewall states), but eventually it worked.