Does FreeRadius allow voucher creation?
-
Might be a silly question - is voucher creation limited to LocalServer or do we have the option in FreeRadius
Thank you!
-
@dmchavoc
Vouchers are login codes that are created in a set. The set defines the duration of the codes it contains.
As soon as a code is sued and validated, it's marked as 'activated' and the counter, defined by the set starts running.
When the time is up, the voucher is marked as used, and can no longer be used.When you activate vouchers in pfSense, you can see a third line showing up on the captive portal login page, that is the place to enter the voucher code. It is advisable to create your own 'html' login page, so only the voucher code is requested from the portal user.
If you make you html (php) login page, you could omit to show up the password text field, and in the code hard code it to for example "123456".
Just leave the "User name" and rename it "Voucher".Now you can use FreeRadius, and set up a user :
( the password is also set to 123456 here)
and pick the time setting you want :
As soon as the Voucher code "Voucher-code-secret" is used, the user can spend 30 minutes online before he gets kicked of the portal for this month. (The Forever option gave me errors ...)
You, as the admin, you generate new and cleanup old "voucher" codes for example;ones a month. -
@Gertjan said in Does FreeRadius allow voucher creation?:
activate vouchers in pfSense, you can see a third line showing up on the captive portal login p
Thank you @Gertjan, at first this went little over my head but your solution is genius.
It is all about perspective, essentially hard-coding the password into the code and renaming the field name from user to voucher. This is great approach.
I am going to think about this a little more to fine-tune it further.
To give you some insight, I am essentially operating a coworking space with about 250 users. Ideally, I would like to give each user their unique credentials which i would like to expire and only renewed once i receive subsequent months payment.
Users are restricted to two devices (hence Radius) but it seems like a hasttle having to manually update their exprations. I thought perhaps i can mass print my vouchers in advance and distribute them as soon as payment is received.
However, vouchers are not expired by date, rather time and do not allow machine limitations.
Back to the drawing board.... seems like ill have to take the bullet for this administration task.