B1300: remotely switch OpenVPN of and Wireguard Server on and vice versa

as Wireguard Server and OpenVPN client can’t run at the same time I need a possibility to remotely switching off VPNClient and starting Wireguard server for the case I am on travel. When having finished my work via Wireguard VPN the Wireguard server should be stopped and the OpenVPN Client should be started.
Any suggestion on how to do this (without SSH)?


You should be able to run both with proper routing rules and tables by keeping the WireGuard server listening on your assigned public IP address(es) and routing by your assigned gateway, rather than through the OpenVPN tunnel. It may require source-/policy-based routing. For several references on this, Search results for 'policy based routing' - OpenWrt Forum

Thanks - that sounds rather complicated. I Checked with the documentation you specified - as I am not familiar with routing in general - I have to find a simpler solution which…

Do you thing there is a chance the developers of GL.inet will implement a solution?


It is a challenging problem to solve, as any error condition might leave you unable to connect at all. At least as I think through it, you are asking for a command that kills your current connection and then (hopefully) reconnects the router. As soon as you kill your current connection, most everything associated with your login session disappears. So while, for example, you could kill the OpenVPN client while connected over OpenVPN, you wouldn’t be able to then start WireGuard as you’re no longer connected. You’d have to trust that whatever was running in the background properly switched over, its operation not visible you.

SSH is perhaps the easiest, robust approach. SSH clients are available for Windows, macOS, `nix, iOS, Android, and others, generally without charge.

Maybe rethink your use-case here…

ssh access can solve a lot of problems here when switching over from WG to OVPN - and there you can trigger a UCI script.

Simplest answer though - pick one VPN in general – done

It also impossible to run OpenVPN Server and OpenVPN Client concurrently…