Limit VPN access by time

How to customize and extend your OpenVPN installation.

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

Post Reply
dofrey
OpenVpn Newbie
Posts: 1
Joined: Tue Mar 10, 2020 2:49 pm

Limit VPN access by time

Post by dofrey » Tue Mar 10, 2020 2:52 pm

Hi

I would like to setup a system where someone could login to my network over VPN. This should not be a big deal, but my problem is, that I want to have control over the access. So always if someone wants to login to my network, I want to open the access for a time limited period of time.
Does anyone has a hint on how I could solve this?

Thanks!

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: Limit VPN access by time

Post by Pippin » Tue Mar 10, 2020 3:12 pm

You would need to write a script for that.
See --client-connect cmd and --client-disconnect cmd in manual 2.4:
https://community.openvpn.net/openvpn/w ... n24ManPage
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp

Post Reply