Best practice for a captive portal without a password?

  • 2
  • Question
  • Updated 4 months ago
  • Answered
What's the best practice for setting up a captive portal login page without password? I'm already using the guestpass generating features so can't simultaneously set up a guest login page without authentication using the 'out of the box features' .

So I'm setting up hotspot services to redirect to a page where users can simply tick 'I accept the T&Cs' and be on their way (The reason for this is the different SSIDs can get to different network resources).

I can make a login page that simply uses a limited user's credentials to login but this feels wrong - surely there must be a better way to do this?

Photo of Bernard Hamlin

Bernard Hamlin

  • 2 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 2
Photo of Alex Ortmanns

Alex Ortmanns

  • 2 Posts
  • 4 Reply Likes
Hi Bernard,

Take a look here, I suggest creating a hotspot service, usign a portal page that shows a accept t&c button that will post a general login (username=user & password=user) to the zd. Docs/WISPr/WISPR_app_note_finaledit2.pdf
Photo of Alex Ortmanns

Alex Ortmanns

  • 2 Posts
  • 4 Reply Likes

add user 'user' to the local db

<title>Free (as beer) Wireless Internet Service</title>
<script type="text/javascript">
function get_param(name)
if (location.href.indexOf("?") >= 0) {
var query=location.href.split("?")[1];
var params=query.split("&");
for (var i = 0; i < params.length; i ++) {
if (value_pair[0] == name)
return unescape(value_pair[1]);
return "";
<h2>Free (as beer) Wireless</h2>
<p>Usage policy: Do no evil. blah blah blah...
<script type="text/javascript">
document.write('<form method=POST action="http://' + get_param("sip") + ':9997/login">');
<input type="hidden" name="username" value="user">
<input type="hidden" name="password" value="user">
<input type="submit" value="I Agree">
Photo of DSE


  • 68 Posts
  • 3 Reply Likes
Hello i'm starting to do a captive portal i'm following you example but i'm struggling with the authentication part. Can you help me? first of all i don't have the ZD in the same lan, neither the web-server, all have public ip's, i thing the problem is in the Post method, i already changed to https but .. nothing.
Photo of Bernard Hamlin

Bernard Hamlin

  • 2 Posts
  • 0 Reply Likes
Hi Alex,

That's great - thank you. I ended up doing almost exactly that and confirmed with ruckus support that this a recommended way to do it. Something in me just didn't like the hidden username/password. Also the timeout for users is based on MAC so sharing a username doesn't change the timeout settings :)


Photo of Martin Kane

Martin Kane

  • 78 Posts
  • 7 Reply Likes
Thanks for the code Alex. I've blatantly copied it and used it myself :) I do have a problem with being kicked off the network after some unknown time and having to press the "I agree" button again - that despite setting the "disconnect after" options to a large number...
Photo of claudio p

claudio p

  • 8 Posts
  • 0 Reply Likes
Anyone achieve this using ajax ?
the respond from the controller is html
Photo of Sureal


  • 12 Posts
  • 1 Reply Like
Hi guys,

I'm looking for this but for Unleashed series. Does this script works as well with Unleashed?
Photo of Jeronimo


  • 337 Posts
  • 40 Reply Likes
UAP is same as ZD.
Photo of alon carmel

alon carmel

  • 3 Posts
  • 0 Reply Likes
Is there an example showing all the related params needed todo this on SZ? There are alot of params that need to be taken from the URL and passed to the controller and I'm having hard time getting this to work.