How to turn off OpenVPN server from Shell?
-
Hi Everyone,
I have been playing with OpenVPN today and I think I set a wrong subnet in the PUSH and now I can't get to the WebConfigurator but I can get to the Shell.
I want to run some sort of a loop on the shell using a cronjob in the shell to do a stop of OpenVPN and start it again after 2 minutes if I loose connection.
Can someone please post the command to run the cron and to stop and start OpenVPN? Unfortunately I am only familiar with CentOS and it's as easy as "service openvpn stop/start" there.
Thanks
-
Just do:
killall -9 openvpn
That should terminate any running OpenVPN process and, I believe it should also remove the routes.
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.