www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

Captive Portal: need to add "Terms of Use"

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
dibu



Joined: 22 Oct 2015
Posts: 3

PostPosted: Sat Oct 24, 2015 7:50 pm    Post subject: Captive Portal: need to add "Terms of Use" Reply with quote

HI all,

due to some legal stuff (in Germany) it is necessary to add some "terms of use" information and "force" the user to accept these before granting access to him.

How can I inckude this requirement in the captive portal?

br,

dibu
Back to top
View user's profile Send private message
gordonf



Joined: 26 Feb 2012
Posts: 89

PostPosted: Wed Oct 28, 2015 6:47 pm    Post subject: This belongs in 802.11x and Captive Portal, but... Reply with quote

I managed to modify the welcome page and provide a terms of use link in a very basic captive portal setup.

I changed the template with these lines, replacing the existing user, password and domain lines:

Code:
  <tr><td width=35% align=right><ZS_TAG +cp_msg USERNAME>  </td><td><input type=hidden value=freeuser name=U size=35 onKeyPress="return CheckEnterKey(this,event)"></td></tr>
  <tr><td align=right><ZS_TAG +cp_msg PASSWORD>  </td><td><input type=hidden value=freeuserpassword name=P size=35 onKeyPress="return CheckEnterKey(this,event)"></td></tr>
  <tr><td align=right><ZS_TAG +cp_msg DOMAIN>  </td><td><input type=hidden value=example.com name=Realm></td></tr>
  <tr><td align=right></td><td><br><input type=button value="I Agree to Terms" onclick="Authenticate()">         <script>if ("<ZS_TAG /system/cp/Auth/Custom/GeneralInfoVisible>"=="yes") {document.write("<a href='javascript:ShowInfo()'><strong>Terms of Use</strong></a>");}</script></td></tr>


I also edited the "info" part to read like a Terms of Use:

Code:
<html>
<head>
<title>Public Wi-Fi Access Terms and Conditions</title>
</head>

<body>
(insert your terms of use here)
</body></html>


The next step is to create a user account in Zeroshell called 'freeuser' with a suitable password, and put this password in the template. I used 'freeuserpassword' as an example here. At some point, though I can't find where at the moment, you also need to grant this user permission to log on multiple times, set a number of hours each logon can use, set up matching DHCP leases, and so on.

The authentication page also lets you upload and use different images for the welcome page, and you can edit the template's colour scheme directly in the page source.

This example assumes you aren't going to use this captive portal for anything but public access, as it uses the built-in example.com realm and doesn't allow for users other than 'freeuser' specified in the template. You might be able to add extra lines to re-enable per-user access and still allow public access.

Because of the sheer numbers of mobile devices that grace my location, I don't bother with enabling the pop-up window that displays the timer, instead disabling the timer pop-up for all browsers. The time limit still applies, however. This does behave quite well on random phones, even on my Lumia 830, where the welcome page appears and the Terms of Use link is available to read before hammering that "I agree" button.
--
Back to top
View user's profile Send private message
dibu



Joined: 22 Oct 2015
Posts: 3

PostPosted: Sat Oct 31, 2015 3:37 pm    Post subject: Thank you .. Reply with quote

.. will go to add and test this or next weekend.

dibu
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group