I've been commissioned by my boss to set up a lab for our customers that they can access via VPN. Each customers should have access to the lab for either 80 or 100 hours, depending on what they purchase. How can I do that? Is there a way to keep track of the time a user is connected via VPN and then close that connection once he or she reaches the time limit?
The specific answer will depend on your specific VPN software but, in general, yes. Most VPN software supports the use of RADIUS for AAA (authentication, authorization, and accounting). In this case what you want is RADIUS authentication and accounting data so that when a user logs on and logs off the VPN you can collect those start/stop times. Your VPN solution should also use RADIUS for authentication so that you can deactivate an account after some usage amount (tracked be the accounting part) has been exceeded.
This is probably not going to all be built into your VPN solution but the foundation for it should be there if RADIUS is supported for AAA. You will probably either need to write or find a backend application which can track RADIUS start-stop accounting messages and enable/disable authentication for a user based on the amount of time which was used.