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?
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:
- create gateway group containing my two remote VPN gateways
- add a firewall rule on the interface receiving the incoming traffic (from my local LAN) destined for the remote network and choosing the gateway group as gateway
- remove the previously set static routes from config and from route status
The connectivity to the remote network was interrupted for a few minutes (I guess due to some firewall states), but eventually it worked.