Captive portal manual logout page address
-
-
I just updated the code ^^
-
any tutorial process to input this code? or edit and add
thanks in advance ive got this issue with my client users for how many months. -
@netx34 said in Captive portal manual logout page address:
any tutorial process to input this code? or edit and add
Yep.
Place (create) it here : /usr/local/captiveportal
Call the file "logout.php".Note : this is NOT a file you can upload into the pfSense Captive Pprtal's file manager !!
Now you can use
http://portal.mypfsense.tld:8004/logout.php
or
http://192.168.2.1:8004/logout.php( if 192.168.2.1 is the IP address of the captive portal's interface - or your set "portal.mypfsense.tld" as the FQDN to this IP using the Resolver.
"8004" is just an example, your port number might be different. ) -
@Gertjan thank you,
im now test it before i deploy it to my exact pf serve,
great work and update.update later after work.
-
btw only the logout.php can apply FQDN for the domain name
-
@netx34 said in Captive portal manual logout page address:
btw only the logout.php can apply FQDN for the domain name
What do you mean ?
-
When I visited this /logout.php page, I was logged out.
So this code works great, thanks. I'm adding in a redirect at the end of the file - it works - but it takes around 20 seconds too load the login page - or any page
Any ideas on a workaround? - I assume the portal is interfering somehow.
<script>window.location.replace("http://example.com");</script>
edit: weird, it a happened a few times, restored a backup and it now works fine..
-
@guntery said in Captive portal manual logout page address:
I'm adding in a redirect at the end of the file
What are you talking about ?
What file ? The script from above ? That a massive "log everybody out" script file.After throwing everybody out, why would you redirect yourself to http://example.com ? Why not the pfSense GUI ?
-
Huh? It logs out the user who goes to that page not all users.
the redirect goes to the splash page either way though right (it's an example), in this case I have 2 captive portals with differing IP's and 1 logout script so it was easier to use the domain redirect not the CP IP
-
@guntery said in Captive portal manual logout page address:
uh? It logs out the user who goes to that page not all users.
I stand corrected.
Had to review the script and true, the caller gets logged out.
Sorry for the noise ^^