I have Pfsence setup in a pub for customer WIFI - The captive portal simply has a "I agree" button to click and connect, and then bounces off to the pubs homepage.
Can someone tell me if this is possible? I am not near the pfsence box to look at the moment, and can't remote into it, so cannot verify my thoughts….
If the captive portals form is sent to pfsence, how can I submit to a second URL?
Can the second URL I want to send the form to be accessed before the captive portal opens?
Any other way to use Pfsence to capture users details at the time of clicking on the captive portal?
Is this possible at all?
Can PFsence be told to let traffic through the captive portal to a specific URL for this form?
Has anyone else managed to add additional form fields to the captive portal?
So I have downloaded the latest version (mine is a little outdated) and have run it on the LIVE CD for some playing.
Seems I can choose a domain name or IP that can pass through the captive portal to allow images to be loaded, or data to go out.
Only thing is you must have a form field called "accept" for the form to be accepted, so I have created a hidden one with the value "Continue", this seems to then work.
I may post the code when I have tidied it a bit!
Lectrician, please do share what you find out. I have a potential client that needs this capability. Thanks!
I altered the index.php file that resides in the captiveportal folder (using the package 'filemanager' is ideal).
I then use PHP to recieve the form fields, turn them into a line of data "timestamp|name given|email given|postcode given|ip address"; (something like that). This is then appended/written to a file, one entry per line, a new file being created each day. The file is available to view via a web browser (see screen shot).
The green 0's shows there has been no warnings given for dodgy details.
If I click the 0, that mac address is added to an associative array and that user booted off the captive portal. They then have to fill in the form again, but a red warning appears on the form too. The green 0 then becomes a red 1. If they log back in, the red 1 turns blue. You can then click this again to ban once more, you then get a red 2 which turns to blue when they log back in. 3 warnings and the warning message they then see is titled "LAST WARNING". If they get warned once again, they are banned for three days (they just recieve a page explaining why they have been banned when they try to login.
Sounds complicated, but it works really well.
If I knew anything about creating packages, I would consider it. I would like to integrate the log viewer into the pfsense template, at the moment it is accessed seperately via http://pfsenseIP/wifilogs/wifilogs.php (with a php sessions password).
This can be used in conjunction with the Squid Proxy and Sarg Reports to see what websites were accessed by the users.