Reply To: Captive Portal for Wireless Hotspot

Home Page Forums Network Management ZeroShell Captive Portal for Wireless Hotspot Reply To: Captive Portal for Wireless Hotspot

#52681

kenoxi
Member

Thanks, I gave it a go, but it wasn’t for me.

For reference and those searching in the future.

I solved this by editing the main Captive Portal template. I added a meta refresh tag to forward to wifi.ourdomain.com, which took the users information, and did everything I wanted in PHP. If the user was sucessful in inputting all the correct data they were then forwarded to this URL:

https://172.16.0.1:12081/cgi-bin/zscp?Section=CPAuth&Action=Authenticate&ZSCPRedirect=REDIRECT-URL/:::REDIRECT-URL-WITH-HTTP/%3f&Powered=POWERED-BY-TEXT&RND=RANDOM-NUMBER&U=USERNAME&P=PASSWORD&Realm=DOMAIN

This essentially logs them on with a standard user account. OK, so theres just one user account that everyone uses, that won’t work for everyone, but for my needs did the job. It’s particularly secure either, but doesn’t actually allow the user to do anything other than access the internet as long as you set ZeroShell up correctly.

Once connected and ZeroShell had run the few pages it needed to, they’re sent back to the same wifi.ourdomain.com, which using sessions knew they were connected to the internet so displayed their name and that they’re connected to the web.

You do of course have to allow wifi.ourdomain.com to be a “free” domain/IP in the Captive Portal settings.

Hope this helps someone, someday.