The goal is to create a simple captive portal where subscribers can sign-in using a shared pass-phrase but do not share a single subscriber account. This type of setup is especially suited for events where guests are given a pass-phrase that only functions during the event. Using the billing-plan attached to the registration-form it's possible to setup start and end times to limit validity to the duration of the event.
For this setup we choose to create a custom input field that is will be used to submit and process the shared pass-phrase. We browse to
Service → Input fields and create a field named
Static Password of type
We browse to
Billing → Billing Plan and create a new billing-plan for the event. We configure the start- and end dates, bandwidth limits, set simultaneous use to one and recurrence to unlimited (or once per MAC-address works too). This billing-plan will be linked in the registration form to be granted upon valid form submission.
Create a new registration form by browsing to
Layout → Registration forms (use the +-icon in the sub-menu). We enable our custom field
Static_Password and enable advanced field validation, a small text box appears which will contain the shared pass-phrase. The value in Place holder is used by the custom portal as label. If you are using multi-lingual capabilities, make sure to edit and save your translations in
Layout → Portal Page → Portal language.
No username in the
Username & password creation / Authentication section will generate an username based on the subscribers MAC or IP-address (depending on the subscriber network Layer 2 or 3 setting). The last section configures the authentication handling; only enable
It's possible to create a proper captive portal using the built-in HSMX
Portal Editor however for this guide we'll use a custom portal because it's simpler and to provide a good code-example for captive-portal-makers.
Grab the custom portal and browse to
Layout → Portal Page. Add a new portal; give it a name and select
Custom Portal as type and submit. Now upload the captive portal to the HSMX in the
Upload custom portal page-block. You can deactivate all options but make sure to enable your registration form.
We end this tutorial by configuring the portal rule, this will decide who and from where will be redirected to our custom portal. Edit the default rule and select your newly added portal under
Select a portal page, you can leave all other options unchecked.