OpenVPN using wrong wan interface (Dual WAN)

So I have two wan interfaces (pppoe and dhcp) and I have set them up using PBR. I usually route most of my traffic through the tun0 interface created by openvpn but I am having this issue where if the second dhcp wan is up, openvpn only uses that as the source internet. I want pppoe to be the primary interface for openvpn and only use wanb if the primary wan interface is down.

I have tried mwan3 in the past but it did not work when using it with openvpn and I did not see many people replying to posts that other people had create don the topic so I ditched it completely. So all in all, is there a way to tell OpenVPN to "flow" through a specific interface?

Thanks a lot!

I do not have a ready made answer but I assume you mean the routing of the VPN endpoint ?

Normally OpenVPN makes a route via the WAN to the endpoint on the server.
If you do not have the default route via the VPN enabled then there is no route to the endpoint set normally.

Maybe you can then just set a static route to the endpoint via the gateway of your choice?

I am weak with networking terms but I mean what interface OpenVPN uses as the "source internet"

Also, how would I go about setting a static route? From the examples I saw after googling were simply adding IPs but both of my interfaces don't have static IPs

Thanks for your help!

It is not about the static IP of the interface but of the gateway address.
You can set a static route with the logical interface names but as this interface normally does not have a link scope you need the gateway address (I have seen remarks that the gateway should be added automatically but this was not the case on my routers).

gateway address can be had from the routing table e.g.:

root@DL-WRX36:~# ip ro
default via 192.168.21.1 dev wan proto static src 192.168.21.9

The gateway address of my wan interface is 192.168.21.1 so if I want to send my OpenVPN via that interface then it would be

ip route add <endpoint-address> via 192.168.21.1 dev wan

The endpoint address is the openvpn servers address