Merlin CLI to enable/disable VPN Policy Rules or VPN Clients

Deepshark

New Around Here
Hello, I see there have been some questions in the past about this but I did not find any answer that actually explained how to do this in deep.

I would like to be able to activate and deactivate VPN policy rules (or VPN Clients, whatever is easier and more straight forward) through CLI, probably making a script in my desktop or something, so I can basically swap between VPNs and my WAN quickly without needing to access the web GUI.

Is there any documentation on how to achieve this?
I tried to find out what is going on through the logs every time I active and deactivate a rule, or that I enable or disable a VPN Client, but I did not find the actual commands being ran so I have no idea whatsoever about what to do.
 

eibgrad

Part of the Furniture
There is no API for managing the VPN policy rules outside the GUI. I suppose one could be developed. It's just a specifically formatted file intended for parsing by the GUI.

Code:
cat /jffs/openvpn/vpndirector_rulelist

If you just want to manage the start/stop of the various OpenVPN clients ...

Code:
service start_vpnclient1
service restart_vpnclient1
service stop_vpnclient1
 

Deepshark

New Around Here
Amazing thanks, I guess I can simply enable all rules and activate their function by enabling the clients.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top