2 different WANs, different default gateways: How do I force one openvpn connection out WAN, and another openvpn connection out WWAN

I am struggling to get the policy function of MWAN3 to work for connections that originate FROM openwrt.

I have two openvpn configurations

A) connects to IP 123.34.65.3 on UDP port 25530
B) connects to IP 123.34.65.3 on UDP port 25531

It seems that most of the PBR tools configure route handling for connections that come INTO openwrt from an interface, and I can't find a way to make these connections behave the same way. PBR is a whole new world for me and I've already learned a lot, but I'm sponning my wheels.

I've tried to attach the openvpn proceses to an IP on Dummy0, but both still take the default route in the main table.

My goal is to create an SDWAN aggregation between a cellular and starlink, and then setup ospf with fast hellos on starlink with a cost of 1 and slow hellos on cellular with a cost of 10. This way my NAT sessions are handled in my VPS and switching between starlink and cellular becomes much smoother (this part is actually working ok even with both tunnels on the same uplink)

Can I please have some help with this final hurdle?

mwan3 hooks classify based on the output chain of the firewall as well, so adding the rule based on these parameters should work.

1 Like

Wahoo!!!! It's working!

The solution was to use a plain IP address in the destination field, instead of specifying a x.x.x.x/32

Thank you for clarifying that it does indeed work and I just needed to check my configs.

This is AWESOME, I can browse the internet and stream video uninterrupted by NAT sessions dying!!!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.