OpenVPN Time sensitive keys

March 24, 2019 236 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?

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

Have another answer? Share your knowledge.