OpenVpn client not working with mwan3

I'm able to get mwan3 and my openvpn client connection working separately, but not together. I'm on v18.06.1.

OpenVPN attempts a connection and appears to succeed. However, the wan connection it uses goes offline because it can no longer ping 8.8.8.8. Perhaps it's unrelated, but none of the routes my vpn server pushes seem to make it to the vpn client, either.

I've scoured the forums and github issues related to mwan3, nothing I've tried makes any difference.

The comments on this pull request (https://github.com/openwrt/packages/issues/6551#issuecomment-410340713) seem related, but the merged changes aren't in the mwan3 package delivered with v18.06.1 (it looks as though the last commit for mwan3 to be included was from March).

Has anyone run into this? Have pointers? Thanks!

Try copying the newest version from github to your router manually.

I'd forgotten to git config --global core.autocrlf false on my Windows machine before cloning the Github repo, so manually copying mwan3 didn't work the first time I tried it.

With the latest mwan3 from master tip, mwan3 is working, but it appears to be overwriting the OpenVpn routes. That is, the tun0 entries are missing. Is there a way to have mwan3 retain the OpenVpn-specific entries when it manipulates the routing table?

Mwan3 and OpenVpn are working for me with a few tweaks.

  1. The OpenVPN tunnel stops passing packets when the wan connection is switched. To mitigate, I have a minutely cron task that pings a vpn-accessible IP and restarts the openvpn service on failure

  2. I manually copied the tip of @vgaetera 's code (commit 27e7e889)

  3. OpenVPN always connects via the wan interface with the lowest weight value, I swap lower values on them periodically (another cron task) to make sure I don't drain the bandwidth my ISPs allow me on just one of my uplinks.

My primary motivation/concern is fail-over. The above solution is working very well. Thanks all!

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