Captive Portal Voucher Support
-
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 :)
-
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
-
Should be fixed.
https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/156487ed7db7f8a08d6063001a37d9cdf54cdd3aThanks for reporting.
-
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?
-
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? -
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.
-
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
-
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?
-
You can start the bounty with the specification and see the feedback.
-
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.
-
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.
-
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 -
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? -
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).