Question

OpenVPN Time sensitive keys

Posted March 24, 2019 487 views
VPN Ubuntu 18.04

I want to make my OpenVPN server to be able to use time-sensitive keys so if a customer purchases 1-month key the key is only valid for a month and after that they are no longer able to connect to the server.
Does anyone know how to do such a thing?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Greetings!

For this there would be no particular OpenVPN functionality, so you would need to extend it beyond that. There are seemingly unlimited paths that you could choose for this, though few (if any) are going to already be laid out and ready without requiring you to develop a solution. One example of how this could be done is by using FreeRADIUS for OpenVPN authentication, and then having billing software which provisioned FreeRADIUS authentication.

In this example, you can see how to set OpenVPN to use FreeRADIUS here:

https://www.osradar.com/openvpn-authentication-with-freeradius/

Then you can see here there is an old (perhaps in need of updating) plugin for WHMCS (popular billing software) to manage FreeRADIUS accounts:

https://github.com/eksoverzero/whmcs-freeradius

As far as I know a clean end-to-end solution does not exist for this, but I hope that I have given you some ideas of how you can begin to proceed with such a task.

Jarland

Submit an Answer