Disable openVPN Button through SSH

Hello,
I’m looking to turn off the Active/inactive button of an OpenVPN connection using SSH.
Actually, I can turn off/on the service using /etc/init.d/openvpn stop/start, it works, but the button doesn’t move.
Do you have an idea if it’s possible ?

Thanks

It’s because the command you are using is for the service itself, not for the ‘enable’ option of the openvpn instance.

You can either edit the config file in /etc/config/openvpn or use some uci commands to set the ‘enable’ value of the openvpn instance you are having.

Editing the config file

  1. vi /etc/config/openvpn
  2. Press “i” ofcourse.
  3. Set the value of ‘enable’ option by 0 on the openvpn instance that you want to disable.
  4. Save by pressing Esc, then type wq.

Uci command - just execute these one in order

  1. uci set openvpn.nameofvpninstance.enable='0'
  2. uci commit openvpn
  3. reload_config

Thanks a lot. :slight_smile:

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