Re: This belongs in 802.11x and Captive Portal, but…

Forums Network Management ZeroShell Captive Portal: need to add "Terms of Use" Re: This belongs in 802.11x and Captive Portal, but…


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:


if (""=="yes") {document.write("Terms of Use");}

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

Public Wi-Fi Access Terms and Conditions

(insert your terms of use here)

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