Only accept voucher first time
PhilR last edited by
There's a setting which will limit users to one connection per voucher - but that kicks out the old session and allows the new one.
I want to only allow the first use of a voucher. How can I do that?
(Use case: User obtains voucher, uses it, discards slip. Random bod picks up slip, connects and discon's the user.)
Gertjan last edited by
Vouchers are the key to the (your) access to Internet.
If someone looses his key, well, this should be his problem, not yours.
The "use only ones to gain access" has an nasty side affect.
Let say : you hand out vouchers that last 24 hours.
The guy logs in, all is well.
Then, he goes of site, his IP in the lease table will get removed eventually.
Another guy logs in with his voucher, and obtains the IP the first guy was using.
Our first guy comes in, and want to connect.
Ok, the MAC address is (could be) known, but he will be using another IP => he will NOT having access anymore.
A captive portal session is based on : the IP and the MAC address. If the voucher code come in again, and their is still time left, old sessions are removed, as you saw, and a new one is created.
Inform your voucher user that he should consider this voucher as a 100 $ paper, a credit card or his house keys. That will do the job.
If he calls in and say "I lost it !!" and you have a copy of the voucher code, you can declare it "used". Then you yell at him - sell him a new voucher, or keep him out because he proved he couldn't take care of his stuff (or whatever ;))
The same way : what you are asking for, is that a voucher user can only use his voucher for ONE device - but many users have also a smartphone, an iPad, notepad, whatever. Using a voucher on ONE device will lock the usage to that device, as long as he keeps the same IP (that pfSense gave him).
Your question concerns a household-with-kids situation, right ? In this case I can imagine why you asked.
Btw : I do think it's possible what you are asking. You will have to change the code (PHP) somewhat.