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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.