How do I restart openvpn client from the command prompt?

Started by pedrofln, September 30, 2015, 09:49:27 PM

Previous topic - Next topic
September 30, 2015, 09:49:27 PM Last Edit: September 30, 2015, 10:12:31 PM by pedrofln
Gentleman,

How can I restart openvpn client from the command prompt? In PFsense there is the pfSsh.php that can be invoked to do that, but I have not found a similar one in OpnSense.

I will appreciate any help in this matter.


Hi,

At the moment we don't have a call for that, although it shouldn't be very hard to create a configd call + script for it like all new features we implement.

Maybe you can add an issue on github (https://github.com/opnsense/core/) for such a feature? When there's time, we might pick it up and come up with calls like:


configctl openvpn client list
configctl openvpn client start <id>
configctl openvpn client stop <id>
configctl openvpn client restart <id>



Regards,

Ad


I was just wondering if these or similar OpenVPN restart commands/scripts were ever implemented or if there are any other similar recommendations?

I would like OPNSense to restart my OpenVPN client running at:    /usr/local/sbin/openvpn --config /var/etc/openvpn/client2.conf     every evening at midnight (12AM). I was thinking about using CRON but wasn't sure the best way on how to implement it myself.

I am currently running 17.1.8 OPNSense

Thanks