User Tools

Site Tools


recipe:create-free-subscriber-network

Distribute free internet

This document describes the required configuration steps to allow users to use Free WiFi access. This document assumes the HSMX server has basic functionality running, this procedure is documented in basic-installation.

  • Configure a subscriber access LAN port
  • Create a free billing plan
  • Setup a simple captive portal

Once this is a done a guest will be able to access the HSMX gateway and automatically be registered using their MAC address.

Create a subscriber network

First we need to configure layer two and three details about our subscriber network. Head to Network / Network Configuration. You can add a LAN port by using the  add icon-icon. Select the physical port used by subscribers to reach the HSMX gateway. Configure the LAN IP address and subnet (eg. 192.168.80.1/24). Most likely you'll want to enable NAT. Click Save and then confirm your actions in the yellow message box with Apply Configuration.

The next step is to enable the DHCP server so clients will be handed IP addresses and other relevant parameters (default route/dns). Head to Network / DHCP and use the  add icon-icon to add a new entry. Select the port that will be used from the dropdown and normally all other parameters will be pre-configured for you. You can use this moment to revise or adjust the DHCP range. Lease-time is in seconds and the default value of 86400 equals a single (24 hour) day.

At this point clients will be handed out IP addresses with the correct gateway and DNS server information but the HSMX gateway will not give internet access yet; this requires an active subscription.

Create a free billing plan

Browse to Billing / Billing Plan and use the  add-icon-icon to add a new billing plan. The first parameter is what type of billing plan we wish to create. Select Free access and click Add billing. For this guide we will only use a small-subset of the available options. Unless otherwise mentioned defaults are good.

  • Global settings

Global settings carries administrative information such as the name and description (in English and the native language).

  • Network settings

This segment is the most interesting one, here you can configure your bandwidth limits. If you configure a volume policy (up/down) the bandwidth speed will be adjusted to Small bandwidth up/down once the threshold is reached. You can use Small bandwidth reset to re-enable normal bandwidth settings (Bandwidth up/down) after a certain periods of days or hours.

  • Time settings

Session timeout determines how long the account can be used. This timer starts at the first login. Once the limit is reached internet access will be cut off. It's possible to use Idle timeout to enable subscribers to resume their Session at a later moment. eg. user gets 1 hour package and Idle timeout is 30 seconds. After thirty minutes the notebook loses wireless connectivity (no server notification). Once the idle timer expires the session time will be frozen. The subscriber has now 29 minutes left on his account.

  • Logical settings.

Make sure to configure Simultaneous use, this setting determines how many devices can connect simultaneously to the network using a single subscription to a billing plan. The Limit account to n MAC addresses is a life-time setting but generally is left empty so multiple devices in succession can connect using the same credentials.

The Recurrence defines the functionality of the account after expiration. There are three identifiers:MAC, guest and user. An user and guest can encompass multiple MAC addresses if Simultaneous use is enabled and Limit account to n MAC addresses is left empty or does not equal one. These can be combined with three limiting modes: n Hours per, Once per and n Times per. The unlimited option allows the subscriber to pick the same billing plan as many times they wish.

Configure a guest form

The next thing to do is create a guest form. Browse to Layout→Registration forms. Use the -button to add a new registration form. Check in the Display column: E-mail and City. Both fields should have a not-empty validation. Select the free-access billing plan from the drop-down. In Username & password creation / Authentication we set the method that identifies the subscribers. We pick Use guest data and leave the defaults as-is. This option bases the username on the e-mail address the subscriber fills in during guest registration and generates a random length, password. Tick Autologin in the before last box On success. We name our form Free wifi form, tick both Visible for portal use and Visible for admin interface. Click Save to finish.

Setup a captive portal

In the final step we create a new portal page and create a portal rule. Depending on the portal rules incoming HTTP requests send from unauthenticated clients are redirect to a certain portal page.

We create a new portal page by using the  add icon-icon in the sub-menu. We named ours Free WiFi Portal and used HSMX portal as Portal type and clicked Add. Once the portal is created it will be opened in edit mode and more options will be available than initially during creation. For this guide we only tick Free Registration Form under Registration form and leave the rest unchecked (Enable cookie based authentication could be enabled by default, this is not necessary for this configuration, uncheck it). Note: every individual box has it's own Submit button.

Now we need to layout the guest form, open the portal-editor with the Go to editor button. By default an empty page will be shown, click anywhere in the empty space and pick Edit Content from the pop-up menu. A pop-up will appear and ask whether to Create new content, pick Use existing content from the drop-down and select Register form in the second. Once you hit Continue you'll have many options to style the appearance. For this guide clicking Save suffices. To publish your results use the -button.

Now we only need to adjust the default portal rule. Go to Layout→Portal Page and open the rules tab. Click of the single entry and make sure to select your newly created portal page under Select a portal page.

Verify

Connect a client to a subscriber network, open up the browser. The registration form should be shown, once logged-in you can monitor this user in the HSMX management web-interface under Subscribers Overview.

Other interesting configurations:

  • Authenticate your guests using OAuth (enables guests to use Facebook, twitter… credentials to login)
recipe/create-free-subscriber-network.txt · Last modified: 2015/10/27 16:12 by mathias