Shutdown OpenVPN server and startup later

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
grumpywhale
OpenVpn Newbie
Posts: 1
Joined: Sat May 20, 2017 9:32 pm

Shutdown OpenVPN server and startup later

Post by grumpywhale » Sat May 20, 2017 9:35 pm

So i am relatively new to the OpenVPN and linux world, i can do some coding and cronjobs but not too familiar with openvpn.
What i have is a raspberry pi running openvpn server, a few clients.

What i would like to be able to do is cron a job to dissable the openvpn at a set time say 00 02 * * * and then have another to start it back up at 6. This is to allow backup services and updates to run automatically.
Now i can dissable the openvpn service but when i restart it the clients cant reconnect without a reboot, and being linux shouldnt really need to reboot just for this.
Is there a specific service that will terminate any connected client that i can use to do this task?

thank you.

Using openvpn on Raspbian jessie on a pi zero

Post Reply