PBR and multiple VPNs failover

Have an OpenWRT router with WWAN interface and several VPN client connections. lets name them
WWAN (default)
VPN1
VPN2
VPN3

Using PBR I have domain based rules that route needed domains via needed vpn interfaces, all not specified domains go via WWAN (default).

In case e.g. VPN1 goes down, the domains that are routed via it start being routed via WWAN

Is there a way to set it up, that in case VPN1 fails, the specified domains start being routed via VPN2, then in case VPN2 is down > VPN3, if VPN3 is down > WWAN?

check out mwan3.

1 Like

I use a script for failover with WireGuard:

This can work with PBR but you have to do it manually, instructions are at the bottom.

MWAN3 seems to be the easier solution