Captive portal Pre-authentication redirect URL 2.3.2-RELEASE-p1 (amd64) problem
-
My code at the top of the custom page is:
(ref: https://doc.pfsense.org/index.php/Captive_Portal_Pre-authentication_Redirect )require_once("globals.inc");
$request_uri = urldecode(str_replace("/index.php?redirurl=", "", $_SERVER["REQUEST_URI"]));
$portal_redirurl = urldecode("$PORTAL_REDIRURL$");
if(!stristr(urldecode("$PORTAL_REDIRURL$"), $request_uri)) {
Header("Location: $PORTAL_REDIRURL$");
exit;
}
?>Change require("globals.inc"); to require_once("globals.inc");
(ref: https://forum.pfsense.org/index.php?topic=109829.0)Body form:
(ref: Suggested in the configuration page.)Redirect pre-autentication work, the problem is to get the authentication form.
Try URL: http://x.x.x.x:8002/index.php (change 8000 to 8002)
(ref: https://doc.pfsense.org/index.php/Captive_Portal_Pre-authentication_Redirect ) with blank page result.Try URL: http://x.x.x.x:8002/index.php?zone=cp_guest
(ref: https://forum.pfsense.org/index.php?topic=110073.30 ) with blank page result.There is little documentation of the Pre-authentication procedure in version 2.3.2-RELEASE-p1,
Someone could tell me if the process is correct?
The cp_guest zone is correct or is it another to get the authentication form?thanks a lot..
(In version 2.2 this works well) -
Try URL: http://x.x.x.x:8002/index.php?zone=cp_guest
(ref: https://forum.pfsense.org/index.php?topic=110073.30 ) with blank page result.Like that ?
Your captive zone 'name' in question is really "cp_guest" ?
The port used by pfSense is really "8002" (mine is 8003 for https and 8002 for http - you can't chose them, they are assigned by pfSense when creating portals)If "http://x.x.x.x:8002/index.php?zone=cp_guest" doesn't work, you have two possibilities :
You portal doesn't work -> make it work first.
Visiting "http://x.x.x.x" (your captive portal address) should redirect you to … as said here : https://forum.pfsense.org/index.php?topic=110073.msg679281#msg679281
Check your port number and zone name - it should be EXACT.There is little documentation of the Pre-authentication procedure in version 2.3.2-RELEASE-p1,
Someone could tell me if the process is correct?As said here https://doc.pfsense.org/index.php/Captive_Portal_Pre-authentication_Redirect and as you might guess, this page isn't really maintained, and rather tricky to use.