Captive Portal auth page not working
-
I am using user manager and only users with CP privilege allowed and
they aren't attached to any groupI have default DHCP lease at 86400 on interface
I have hard timeout on CP at 1430 or 10 minutes less
DHCP forwarding is enabled
Username and Password does not work, and routes to error page
This happens with default pfsense html pages
But, after entering credentials on default error page then allowed to internet
When using my custom page, It goes to error page and when logging in there
CP just loops back to error page and never allows accessHere is the form on custom page
The error login page has the same operation
Thanks
-
@Calling:
I am using user manager and only users with CP privilege allowed and
they aren't attached to any group ….;D
"Privileges" are attached to "Groups". Users are attached to Groups.
Users NOT attached to any Groups have NO rights ("Privileges") declared, nothing happens, nothing works.Create a Group called "Whatever" or "Portal" and give this "Group" the right to visit the "captive portal", and not the other pages present in the GUI.
Assign your users, those who should visit the captive portal, to this Group.Things start to work.
-
I created a group as per instructions (please see attached)
It still isn't working, just goes to error page and then loops
back to error pageIt must be my page but the form looks right
-
Use (first) the default, builtin portal page.
See that is it works.
Then put in place your own page.
It works : good !
It doesn't : make it work. -
I understand, Yes it works with default page
Does anyone have the html cod for the default page?
Maybe I can figure out what i am missing
thanks
-
@Calling:
Does anyone have the html cod for the default page?
Strange question.
We all have the 'html' code for the default portal login page …..
.... because it's built into pfSense. See image for the button.To get the code : use you browser, visit the portal page (login to you portal network) and have it show to you the "source code" of the page.
@Calling:
Maybe I can figure out what i am missing
Compare you own home made page with the official one.
Btw, when you paste html code here in this forum, make it readable (for humans), like this:
<title>Brit Hotel Fumel</title> <form method="post" action="$PORTAL_ACTION$"> Bonjour, Vous êtes sur le portail d'accès "Internet" de [Brit Hotel Fumel](http://www.brit-hotel-fumel.fr/) Veuillez saisir le numéro de votre chambre Le mot de passe ´Wifi´ est disponible à la réception, et mentionné sur la feuille " Informations " présent dans votre chambre. Pour info IP: $CLIENT_IP$ MAC: $CLIENT_MAC$ ZONE: $PORTAL_ZONE$ global $config, $cpzone; if(isset($config['voucher'][$cpzone]['enable'])) { ?> } ?> </form>
or, even better : http://pastebin.com/a5NJ3tZ0
-
Thanks for your help
I have only been working with html for less than a week (Know little to nothing)
But luckily can tell the difference between auth_pass and auth_password
Not sure how that happened but not surprised
-
I don't know where "auth_password" came from.
pfSense isn't using it. (check out /etc/inc/captiveportal.inc).
"auth_pass" is used. -
Right, I changed it to auth_pass and it worked like a charm
What do you mean when you say (check out /etc/inc/captiveportal.inc)
Is that some kind of shell window, how do you get to directories
through the webgui? in pfsenseAgain, thanks for all your help
-
No need to checkout your pfSense install, you could tead this :
The main 'index.php' file that generates the login page (and error page) :
https://github.com/pfsense/pfsense/blob/RELENG_2_3_2/src/usr/local/captiveportal/index.php
and
https://github.com/pfsense/pfsense/blob/RELENG_2_3_2/src/etc/inc/captiveportal.inccaptiveportal.inc contains most, if not all the logic.