What's new

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

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

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.
 
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
 
Amazing thanks, I guess I can simply enable all rules and activate their function by enabling the clients.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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