Setting up mwan3 failover & openvpn

Hi guys,

I have been wanting to route all of my traffic through a VPN now but I can't seem to get it to work with mwan3. I can get both of them to work separately but not together. (IPV4 only)

I have two wan connections and I simply want to set up a failover. One is a pppoe connection which I want to be the primary wan and then a wanb which is using DHCP. When I reboot my router, DHCP connects first and all traffics starts flowing through that when using openvpn...

When I setup up mwan3, the failover works perfectly but as soon as I add openvpn, the internet stops working for the lan clients (The router seems to connect to the vpn and internet works on the router.)

Right now, I simply got rid of mwan3 for the vpn to work and have to manually stop wanb first before connnecting to the vpn.... ":P"

Guides used:

  1. OpenVPN Client Setup with killswitch
  2. mwan3 failover setup - I used this video but basically, two different interfaces with metric 10 & 20 respectively followed by members for each of the interfaces. wan interface member metric and weight set to 1 and for wanb it was metric and weight both 2.

Please let me know if I need to attach something specific or if I didn't explain the issue clearly. Thanks a lot in advance for your help.

Edit: I did try adding the vpn interface to mwan and giving it the highest priority in failover. It's status was online but the internet still didn't work for lan client...

You should start the openvpn service (simply by putting delay in ovpn startup script) when both mwan3 interfaces are operational. After that you can prioritize the connection with ipset rule, be sure to use sticky rule as well. The mwan3 interfaces need usually around 30s / 1 min to detect the internet.
When doing a mwan3 failover, you need to reconnect the openvpn again simply by putting a script in mwan3.