Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Voucher Length

    Scheduled Pinned Locked Moved Captive Portal
    44 Posts 18 Posters 49.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      klamath
      last edited by

      Hi there!  :)
      I have a pfsense firewall running at the hotel and we've been using the captive portal with voucher system for a short time', but we've got a lot of complaints from the guests about the length of the vouchers.

      we are wondering if anyone has any tip for shortening the length of the vouchers?
      is it possible, vouchers to 6 characters max?

      thanks!

      HP ProLiant MicroServer N40L - 2GB - 250G HD - 3 NIC Intel PRO/1000 MT Gigabit PCI
      pfSense 2.0.1-RELEASE (amd64)

      1 Reply Last reply Reply Quote 0
      • N
        Nachtfalke
        last edited by

        This would be interesting for me, too.
        Perhaps it would be possible to shorten the characters. So just use numbers so it is easier for your guest to enter these voucher codes.

        But it would be great if there would be an option to enter a specific voucher length.

        1 Reply Last reply Reply Quote 0
        • V
          valshare
          last edited by

          +1

          1 Reply Last reply Reply Quote 0
          • D
            dj_seijin
            last edited by

            +100

            1 Reply Last reply Reply Quote 0
            • E
              eri--
              last edited by

              You can restrict the character set already only to numbers.
              But without some financial backing i do not think anyone will do the modifications.

              1 Reply Last reply Reply Quote 0
              • S
                sandern
                last edited by

                Create a shorter private key and modify the roll/ticket/checksum bits accordingly.

                My vouchers are 6 characters long.

                1 Reply Last reply Reply Quote 0
                • N
                  nabachi
                  last edited by

                  @sandern:

                  Create a shorter private key and modify the roll/ticket/checksum bits accordingly.

                  My vouchers are 6 characters long.

                  Hi,

                  Can you please elaborate more on this. How did you create a shorter Key? I was getting an error when i tried to create a 6-bit key. Any Help would be great.

                  Thanks

                  1 Reply Last reply Reply Quote 0
                  • V
                    valshare
                    last edited by

                    Hi, the shortest key i was able to create with openssl was a 32bit key. With this, i was ables to create a 8-10 length Voucher key.

                    1 Reply Last reply Reply Quote 0
                    • N
                      nabachi
                      last edited by

                      ah, so i must be doing something wrong in the voucher configuration. :)

                      Which values did you use in number of roll, ticket and checksum?

                      I am now trying out different values in the configuration. 8 - 10 characters is good in my opinion.

                      Thanks Valshare

                      1 Reply Last reply Reply Quote 0
                      • N
                        nabachi
                        last edited by

                        Hi again,

                        I couldn't make the voucher length shorter than 20 characters. Rolls and Ticket bits seems to effect the number of voucher rolls and tickets which can be created under each roll or tickets.

                        Kind Regards

                        1 Reply Last reply Reply Quote 0
                        • V
                          valshare
                          last edited by

                          Hi,

                          here are my setting. You must delete the old tickets and create new ones.

                          Regards, Valle

                          voucher_setup.jpg
                          voucher_setup.jpg_thumb

                          1 Reply Last reply Reply Quote 0
                          • V
                            valshare
                            last edited by

                            there is an error in the "# of Roll Bits". This must be 15 to leave room the place the magic initializer.

                            1 Reply Last reply Reply Quote 0
                            • N
                              nabachi
                              last edited by

                              @valshare:

                              Hi,

                              here are my setting. You must delete the old tickets and create new ones.

                              Regards, Valle

                              Hi Valle,

                              Thanks to you, i was able to generate 10 - 7 character long voucher  :)

                              I was able to generate 7 character log vouchers with the default voucher configs from a fresh installation of pfsense 2.0. I had 20 character voucher's after i changed "character set" to 123456789.

                              Many Thanks & Kind Regards

                              1 Reply Last reply Reply Quote 0
                              • K
                                klamath
                                last edited by

                                @sandern:

                                Create a shorter private key and modify the roll/ticket/checksum bits accordingly.

                                My vouchers are 6 characters long.

                                explain how to do it, please!

                                HP ProLiant MicroServer N40L - 2GB - 250G HD - 3 NIC Intel PRO/1000 MT Gigabit PCI
                                pfSense 2.0.1-RELEASE (amd64)

                                1 Reply Last reply Reply Quote 0
                                • S
                                  sandern
                                  last edited by

                                  Hi,

                                  First generate a key "openssl genrsa 30 > key.private"

                                  I'm not sure about the 30 but I tried a few times to get the smallest possible number, it was 29-30-31 or something. The lowest one it would accept.

                                  Then openssl rsa -pubout < key.private >key.public

                                  And use the following values in the configuration screen:

                                  Roll bits: #5 (This can be more but we didn't have to use many different rolls)
                                  Ticket bits: #16
                                  Checksum bits: #5

                                  With this values I had a roll with 1023 vouchers with a length of 5-6 characters.

                                  Sander

                                  1 Reply Last reply Reply Quote 0
                                  • K
                                    klamath
                                    last edited by

                                    @sandern:

                                    Hi,

                                    First generate a key "openssl genrsa 30 > key.private"

                                    I'm not sure about the 30 but I tried a few times to get the smallest possible number, it was 29-30-31 or something. The lowest one it would accept.

                                    Then openssl rsa -pubout < key.private >key.public

                                    And use the following values in the configuration screen:

                                    Roll bits: #5 (This can be more but we didn't have to use many different rolls)
                                    Ticket bits: #16
                                    Checksum bits: #5

                                    With this values I had a roll with 1023 vouchers with a length of 5-6 characters.

                                    Sander

                                    Thanks!!!
                                    works only with 31… i got error with 30!

                                    "openssl genrsa 31 > key.private"

                                    The vouchers is now with  7 characters length!

                                    Work like a charm!!!
                                    THANKS!!! THANKS!!! THANKS!!!

                                    HP ProLiant MicroServer N40L - 2GB - 250G HD - 3 NIC Intel PRO/1000 MT Gigabit PCI
                                    pfSense 2.0.1-RELEASE (amd64)

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      brunoguidone
                                      last edited by

                                      @sandern:

                                      Hi,

                                      First generate a key "openssl genrsa 30 > key.private"

                                      I'm not sure about the 30 but I tried a few times to get the smallest possible number, it was 29-30-31 or something. The lowest one it would accept.

                                      Then openssl rsa -pubout < key.private >key.public

                                      And use the following values in the configuration screen:

                                      Roll bits: #5 (This can be more but we didn't have to use many different rolls)
                                      Ticket bits: #16
                                      Checksum bits: #5

                                      With this values I had a roll with 1023 vouchers with a length of 5-6 characters.

                                      Sander

                                      Sorry, can you explain better?
                                      because it still doesn't work. I need to generate a voucher with 6 characters.

                                      Thanks for help,
                                      Bruno

                                      1 Reply Last reply Reply Quote 0
                                      • W
                                        wallabybob
                                        last edited by

                                        What parameters did you try? What was the outcome?

                                        How many characters do you have in your set of available characters for voucher codes?

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          brunoguidone
                                          last edited by

                                          @wallabybob:

                                          What parameters did you try? What was the outcome?

                                          How many characters do you have in your set of available characters for voucher codes?

                                          Hi Wallabybob
                                          That's my configuration:
                                          .
                                          I tried all combinations and stays longer than 10 characters. Can you help me, please ?

                                          Thanks,
                                          Bruno

                                          1 Reply Last reply Reply Quote 0
                                          • W
                                            wallabybob
                                            last edited by

                                            @brunoguidone:

                                            Can you help me, please ?

                                            I have not read the voucher handling code so I'm guessing. After reading this thread a few times I SUSPECT Sandern left out a step in his instructions: I suspect that the contents of the key.private and key.public files should be pasted into the corresponding key boxes on the voucher configuration page. Did you do that?

                                            I suspect the default keys need to be replaced by shorter keys to produce a shorter length voucher code. Possibly a smaller magic number will also help.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.