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

    Captive Portal Voucher Support

    Captive Portal
    14
    21
    23.4k
    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.
    • M
      marrco
      last edited by

      Ne1 found a solution ?

      the only reason why i have to use mono is because of the voucher system. Is there an easy way to migrate that feature to pfsense ?

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

        Has anyone attempted to bring the voucher system over to pf 2.0? are there any plans to add this feature?

        Im trying to do this at the moment, but its messy and im trying to clean it up as much i can, if anyone else is interested in this, they can help out.

        A list of file names are here http://www.ohloh.net/p/4202/commits/38161420 and the sourcecode here http://svn.m0n0.ch/wall/branches/freebsd6/.

        I havent accomplished much, so far I only have it included in the cp menu, so that its showing up on the gui, someone reported in this thread it didnt work for them, did you compile the voucher.c file?

        I think this is a nice feature to add to pfsense 2.0

        Slam

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

          How about this :)
          https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/336e3c1cabef46d5825bb0540a6715dff86450e7
          https://rcs.pfsense.org/projects/pfsense-tools/repos/mainline/commits/ba687e4a05ea8d2b50207957d094682d6892f947

          JOY :D

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

            :D Youre a genius!

            Thank you very much, I was making slow progress and my coding skills are 0, but atleast I got the chance to see how the inner workings of pfsense  ;D

            I have sent small donation, not much but give me a chance, Im in the middle of buying some equipment, once I have some loose cash, Ill top you up.

            Thanks once again, Ill try the next snapshot when its available.

            Slam

            1 Reply Last reply Reply Quote 0
            • F
              funnyfrish
              last edited by

              ermal that would be great. Im willing to donate if your work is finnished.

              keep up

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

                This work is finished.
                It is present in 2.0 snapshots if you want to use it.

                The captiveportal now is even multi-interface capable in 2.0 so what you need more :)

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

                  Hello Ermal,

                  I found a few bugs.

                  Im testing on fresh install "2.0-ALPHA-ALPHA built on Sat Jun 20 17:00:01 EDT 2009 FreeBSD 7.2-RELEASE-p1".

                  1: I have uploaded a "Portal page contents" with the new required fields, as the captive portals default index.php doesnt have those details yet.

                  2: Ive set up captive portal correctly and generated a few codes, when I launch the browser, I get redirected to my login screen as expected, however, after entering the access codes and hiting return I get the following error.

                  Fatal error: Call to undefined function voucher_auth() in /usr/local/captiveportal/index.php on line 127

                  I fixed this by adding "require_once("voucher.inc");" to "/usr/local/captiveportal/index.php"

                  3: Once Im authenticated, the redirect page appears with an error and the redirect url appended to it.

                  Warning: fopen(): Filename cannot be empty in /etc/inc/voucher.inc on line 165 Redirecting to http://en-gb.start2.mozilla.com/firefox?client=firefox-a…

                  This one is way over my head and I couldnt work out the code in voucher.inc to find a fix  :P

                  Apart from the above 3 small issues, it seems to be working great so far.

                  Thanks

                  Slam

                  EDIT: also on "Status" > "Captive Portal" > "Active Vouchers" an error appears in the "Activated at" row with "Warning: date() expects parameter 2 to be long, string given in /usr/local/www/status_captiveportal_vouchers.php on line 106" which in turn screws up the next 2 rows across named "Expires in", "Expires at", both these values show up as "1225474073 min" and "10/12/2025 06:51:28"  :o :D I initially had created 10 x 360 mins codes and was testing with one of them.

                  The rest of the captive portals status pages work fine.

                  Thanks

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

                    Should be fixed.
                    https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/156487ed7db7f8a08d6063001a37d9cdf54cdd3a

                    Thanks for reporting.

                    1 Reply Last reply Reply Quote 0
                    • C
                      cjkeeme
                      last edited by

                      This is awesome.  I know many have been waiting for multi-wan captive portal functionality for a long time.  Many thanks to the development team on this one.

                      One question I have is if the traffic shaping feature will work with the multi-want captive portal?

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

                        You have the shaping of CP and it will work on multi-wan.
                        Or you are asking the traffic shaper of pfSense itself and not that of the CP?

                        1 Reply Last reply Reply Quote 0
                        • J
                          Jerubei
                          last edited by

                          I just want to say thank you for this great feature! I've switched from m0n0wall because vouchers are now available in pfsense. Works great for cafe hotspots, offering free Wi-Fi access to their customers - no more leeching neighbors.

                          I can report a bug with the error page, after it's accessed, the redirect to the original page is lost. I'm using custom html files, but they are the same from m0n0wall, which didn't exhibit this problem.

                          1 Reply Last reply Reply Quote 0
                          • ?
                            Guest
                            last edited by

                            Is this working with version built 090910 ?

                            not working for me anyway
                            if i choose "no authentication" everyone can login and other choises noone can login..ideas?

                            /F

                            1 Reply Last reply Reply Quote 0
                            • R
                              rhy7s
                              last edited by

                              Is the voucher system that's being introduced to pfSense the same time based system as http://doc.m0n0.ch/handbook/ch12s04.html? I don't have a whole lot of funds but do you think a data based voucher option would be a feasible addition to this project if I were to start a bounty to that effect?

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

                                You can start the bounty with the specification and see the feedback.

                                1 Reply Last reply Reply Quote 0
                                • F
                                  FRiC
                                  last edited by

                                  @rhy7s:

                                  Is the voucher system that's being introduced to pfSense the same time based system as http://doc.m0n0.ch/handbook/ch12s04.html? I don't have a whole lot of funds but do you think a data based voucher option would be a feasible addition to this project if I were to start a bounty to that effect?

                                  The pfSense (2.0) voucher is the same as the m0n0wall one. But there are probably still some bugs. Saving the captive portal settings don't log the users out, and killing the user's session doesn't seem to work very well. I also ran into a problem where I was playing with the voucher's code length and complexity and it somehow corrupted my entire voucher database.

                                  I didn't seem to have such problems in m0n0wall.

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

                                    I fixed some small issues here and there so retry with next snap.

                                    Just next time report on the 2.0 forum the steps to reproduce your problems.

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

                                      To be clear in advantage:
                                      I'm sorry but I am a complete Noob on linux.

                                      I would like to use the 1.2.3 captive Portal but need Vouchers.

                                      I've tested the 2.0-Alpha-Alpha but its a little bit too Alpha for my taste.
                                      (Hang in CP when enabling, result in no reaction, freezing etc…
                                      thats why its alpha but not suitable for use in a non testing area)

                                      I want to use vouchers to limit the free access to about twenty minutes or halve an hour to keep neighbors and schoolkids out.

                                      I've read the Commitments linked in this Topic but have no clue how to Add the Voucher Support on 1.2.3
                                      As I stated above I'm a noob on this.
                                      Is there an packet available wich adds the voucher support to the 1.2.3?
                                      Or can someone give me a clue howto add this by myself?

                                      Thanks in advance
                                      Claus

                                      1 Reply Last reply Reply Quote 0
                                      • A
                                        apatrick
                                        last edited by

                                        I've also recently installed the 1.2.3 and am interested in vouchers.
                                        Is there any tool (apart from the 2.0 Alpha) that can allow time based vouchers generation from a computer in the LAN other than the pfsense box itself?

                                        1 Reply Last reply Reply Quote 0
                                        • GruensFroeschliG
                                          GruensFroeschli
                                          last edited by

                                          You could set up a RADIUS server on which users are generated with a expire time.
                                          Set the captive portal to authenticate against this RADIUS server and enable the option to reauthenticate every minute (might require some decent hardware if you want to do that for a large number of users).

                                          We do what we must, because we can.

                                          Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

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