Best practice for a captive portal without a password?

  • 2
  • Question
  • Updated 6 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?

cheers
Bernard
Photo of Bernard Hamlin

Bernard Hamlin

  • 2 Posts
  • 0 Reply Likes

Posted 4 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.

http://docs.globaltele.com.ua/files/R... Docs/WISPr/WISPR_app_note_finaledit2.pdf
Photo of Alex Ortmanns

Alex Ortmanns

  • 2 Posts
  • 4 Reply Likes
Example

add user 'user' to the local db

<html>
<head>
<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 ++) {
value_pair=params[i].split("=");
if (value_pair[0] == name)
return unescape(value_pair[1]);
}
}
return "";
}
</script>
</head>
<body>
<center>
<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">');
</script>
<input type="hidden" name="username" value="user">
<input type="hidden" name="password" value="user">
<input type="submit" value="I Agree">
</form>
</center>
</body>
</html>
Photo of DSE

DSE

  • 59 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 :)

Cheers!

Bernard
Photo of Martin Kane

Martin Kane

  • 72 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

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

Sureal

  • 2 Posts
  • 0 Reply Likes
Hi guys,

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

Jeronimo

  • 94 Posts
  • 9 Reply Likes
UAP is same as ZD.