The pfSense Store

Author Topic: Unused Vouchers shown as expired  (Read 163 times)

0 Members and 1 Guest are viewing this topic.

Offline legacysl

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Unused Vouchers shown as expired
« on: November 27, 2017, 10:30:05 pm »
Hi all, was running 2.3.4 with a captive portal and vouchers of different time durations, 24 hours / 48 hours etc. Everything was working fine but unfortunate due to a power outage the config/install got corrupted and I had to to a fresh install and upload a backup of the config.

Since 2.4.0 was released I decided to to trial that. The same voucher rolls where generated with the restoration of the config but since they where unmarked as used it should not have been an issue.

Right now if I issue 10 vouchers at least 4 will come back as expired. I have upgraded to 2.4.2 and deleted the old rolls and generated new ones but the problem persists.

Is there a known issue with 2.4.0 and above regarding vouchers?

Thanks for the help.

Offline Gertjan

  • Hero Member
  • *****
  • Posts: 2147
  • Karma: +165/-9
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #1 on: November 28, 2017, 06:26:03 am »
Hi,

Do yo mean that when you create a new roll with for example 10 vouchers with a duration of 15 minutes, some of them are expired as soon as you create them ?

Offline legacysl

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #2 on: December 05, 2017, 10:34:38 pm »
Its for use in a public wifi zone and w use vouchers to limit guest bandwidth usage, I have created 3 rolls of 1440 mins / 2880 mins & 4320 mins respectively. Each roll has 1023 vouchers. 

Say that we issue 10 guest one voucher each, 4-5 of them will get an error saying the voucher has expired.


Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9220
  • Karma: +1048/-308
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #3 on: December 05, 2017, 10:57:21 pm »
So take some and test them. What do you see? What does the portal auth log say?

Going to need more information. When I have used vouchers they worked fine.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Offline Gertjan

  • Hero Member
  • *****
  • Posts: 2147
  • Karma: +165/-9
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #4 on: December 06, 2017, 06:14:04 am »
Same here.
Created 5 rolls  with 5 vouchers each - lasting 15 minutes each.
Tested them all using the "voucher test page"
They ware all valid, 15 minutes left.
When using one, it timed out after 15 min.


Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21388
  • Karma: +1432/-26
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #5 on: December 07, 2017, 08:53:22 am »
I have not seen this personally but I have seen someone say it happened when they made custom shorter keys and made the bit counts lower so they could have shorted voucher codes. At some point there isn't enough randomness in the voucher codes and things get unpredictable, which is why the defaults are where they are.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline legacysl

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #6 on: December 07, 2017, 10:45:42 am »
So take some and test them. What do you see? What does the portal auth log say?

Going to need more information. When I have used vouchers they worked fine.

Log shows it as expired voucher no other information

Offline legacysl

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #7 on: December 07, 2017, 10:46:58 am »
I have not seen this personally but I have seen someone say it happened when they made custom shorter keys and made the bit counts lower so they could have shorted voucher codes. At some point there isn't enough randomness in the voucher codes and things get unpredictable, which is why the defaults are where they are.

This maybe a possibility as I have made the key shorter but this only started to happen on 2.4.2

Offline legacysl

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #8 on: December 07, 2017, 10:54:22 am »
So now its throwing out a new problem. So when a user connects who's token has expired the only get the confirmation page but it does not redirect or allow browsing.

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9220
  • Karma: +1048/-308
    • View Profile
Re: Unused Vouchers shown as expired
« Reply #9 on: December 07, 2017, 05:09:30 pm »
When I used them I used a 31-bit RSA key for shorter codes and never saw a problem. I was not issuing "lots" of vouchers though. Rolls of 100 usually.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM