Captive Portal - Voucher valid on the first device

  • Hi

    Whe are using PFSense to control internet access on the hospital.

    The vouchers are issued to patients at the hospital admission.

    We know that employees copy vouchers and use the Internet when they should be working.

    Question: How to make the voucher is only valid on the first device that is used?


    Marcelo Padilha

  • Did you try

    Disable concurrent logins
    If this option is set, only the most recent login per username will be active. Subsequent logins will cause machines previously logged in with the same username to be disconnected.

  • also try

    Enable Pass-through MAC automatic addition with username

    it should bind the user/Vouchers to the mac

  • Try this:
    For the voucher time limit (when creating roll), set 1 minute. (so the voucher is almost immediately invalid after using up, making each voucher single use).
    Then set a hard time limit (session time limit) of how long you want the users to be able to access the internet. (Eg, if you want to give patients 6 hours of internet, set hard timeout to 360).

    This would then mean you can enter the voucher at login, then its "spent", and the user may surf the internet for 6 hours. If the user logout prior to this, then the time left is forfeit.

    More info here (see section "Troubleshooting" about "users still active after voucher expire"):

    You need to test it however that it works the way you want, since there have been changes between the versions of pfSense.


    If this doesn't work, I would suggest creating a custom authentication page, that contains code to also mark each voucher as "spent", so each voucher code can only be used once. This can be done efficently by having all valid vouchers in a list, and deleting vouchers as they become spent.

  • Thanks sebastiannielsen, but this solution wont let me change the voucher time so all vouchers will be expired after "Hard timeout" period i just wanted to make vouchers with various amount of times
    so isn't there any other solution ??