Captive portal for WiFi hotspots

Overview

Scenario

Checklist

Enable the NetAccess service type

Add a destination

Add a node

Create a WiFi vendor

Create a customer tariff

Enter rates

Create a destination group set

Create a destination group

Assign destinations

Create a volume discount plan

Define a quota within the volume discount plan

Configure a service wallet

Create a main product

Create an add-on product

Create a customer

Generate vouchers

Create a root user

Configure the captive portal on the Configuration server

Testing

 

Overview

A hotspot is a physical location where people may connect their phones, laptops and other devices over WiFi to access the Internet either for free or for a fee. Before they access the service, users land at the captive portal where they subscribe and / or login, accept the terms of use and can then select their service access options.

 

PortaBilling® contains a captive portal for WiFi hotspot services. This enables you to configure WiFi access points in public places like cafes, libraries, airports, etc. plus generate revenue by selling WiFi vouchers to prepaid users.

 

The supplied captive portal interoperates only with Huawei BNG (Broadband Network Gateway) and is a sample model. It consists of a front-end web application and a back-end signup module that are both customizable. Your in-house or outsource developers can extend it to interoperate with other WiFi routers and access points that you use. Or, they can use it as the base when building your customized captive portal.

 

 

This chapter demonstrates how to configure PortaBilling® to provide WiFi hotspot services to prepaid users via WiFi vouchers.

 

The BNG configuration is outside the scope of the present document, so please follow the Huawei configuration guidelines to configure BNG and provision the following information about the billing server to it:

·       The server’s IP address;

·       The authentication key for RADIUS communication;

·       The authentication key for communication with the signup module via the Huawei portal protocol V2.0;

·       The port for sending authorization requests (1812 by default);

·       The port for sending accounting requests (1813 by default);

·       The URL of the captive portal (by default, accessible at https://<your_web_server_IP>:443/captive_portal).

Scenario

Let’s say you provide WiFi hotspot services via a captive portal. To access the service, users must accept the terms of use and log in. New users sign up to the service by entering their name, email, gender and phone number. Upon signup, they are provided credentials for subsequent logins.

 

Your WiFi access options include the following:

·       30 minutes free per day;

·       $10 vouchers for 1 hr. and

·       $15 vouchers for 2 hrs.

 

Once the user is authorized for the service, they see their session status and their remaining time.

Checklist

Print the following page and use it to check off the operations you have completed while performing the system setup according to the instructions in this chapter. Please be sure to perform all of the operations in the order designated (all of the boxes must be checked), otherwise the service will not work.

 

 

Operation

 

Done

General configuration

 

Enable the NETACCESS service on the Configuration server

[     ]

Create a symbolic destination WiFi

[     ]

Network configuration

 

Add Huawei BNG as a node

[     ]

Rating configuration (Vendor)

 

Create a tariff A that describes your data transfer costs

[     ]

Insert rates in tariff A for a symbolic WiFi destination

[     ]

Create a vendor

[     ]

Create a connection for this vendor with the WiFi service type using tariff A

[     ]

Rating configuration (Customer)

 

Create a tariff B, which will be applied to prepaid WiFi users

[     ]

Insert rates in tariff B for a symbolic WiFi destination

[     ]

Create a destination group set

[     ]

Create a destination group under the destination group

[     ]

Assign the WiFi prefix to this destination group

[     ]

Create a volume discount plan A that provides a daily quota of free minutes

[     ]

Define a daily quota within the volume discount plan A

[     ]

Create a volume discount plan B that provides prepaid service usage options

[     ]

Configure a service wallet within the volume discount plan B and define its top-up options

[     ]

Create a main product for WiFi access

[     ]

Create one rating entry in this product, using the node you created and tariff B

[     ]

Associate volume discount plan A with this product

[     ]

Create an add-on product for WiFi access and allow it to be used with the main product

[     ]

Associate volume discount plan B with this add-on product

[     ]

Create a main product with the Voucher account role. It will only be used for generating WiFi vouchers

[     ]

Account provisioning

 

Create a customer who owns WiFi vouchers

[     ]

Generate batches of WiFi vouchers for this customer. The voucher opening balance must coincide with your service wallet top-up options

[     ]

Captive portal configuration

 

Create a user with Root permissions that will be used to create accounts for users during signup

[     ]

Configure the captive portal on the Configuration server

[     ]

Testing

 

Open the captive portal page, sign up and establish a WiFi session

[     ]

Enable the NetAccess service type

1.     Enable the NetAccess Service in the Service Types group on the configuration server web interface.

2.     Click the Save button and then the Verify button.

3.     Verify the new configuration and click the Check / Apply button.

 

Enable the NetAccess service type

Add a destination

1.     From the navigation tree to the left, select Service catalog, then Rate codes and click Destinations.

2.     Switch to the Create a destination panel and fill in the new destination details:

·       Format – Select Custom.

·       Prefix – Type in WiFi.

·       Description – Provide some descriptive information about this destination.

 

Add a destination

 

3.     Click Save.

Add a node

This step is only required if you have not entered your BNG into the system before.

 

A BNG is a trusted gateway and must therefore be entered as a node in PortaBilling®. PortaBilling® requires some key information about your network equipment such as an IP address, Node ID, RADIUS shared secret, etc.

 

1.     On the navigation menu, select Infrastructure. Go to the Billing data sources link and click Nodes.

2.     On the Create node panel, fill in the node details:

·       Name – A short descriptive name for this node (e.g. Huawei BNG).

·       Node ID – The BNG host name (recommended hostname.domainname).

·       IPThe IP address of the node.

·       Manufacturer – Select Huawei.

·       Type – Select BRAS.

3.     Click Save.

 

Add a node

 

4.     On the Communication with billing section use the slider to enable the Communication with billing option and fill in the node details:

·       Client protocol – Select RADIUS to enable the BRAS (node) to communicate with PortaBilling® via RADIUS.

·       RADIUS key – Enter the RADIUS secret key you specified in the BNG configuration.

·       RADIUS source IP – See the Node ID, IP and Radius source IP section of the PortaBilling® Administrator Guide. Unless your node has multiple network interfaces, the value here will be the same as for the IP.

 

Add a node

 

5.     Click Save.

Create a WiFi vendor

Follow the Create a vendor tariff, Enter rates, Create a vendor and Define connections steps from the Prepaid WiFi services handbook to add a vendor for WiFi services in PortaBilling®.

Create a customer tariff

To provide WiFi access services to customers, create a tariff, which will be applied to WiFi users.

 

Follows these steps:

1.     On the navigation menu, select Service catalog and click Tariffs.

2.     On the Create tariff panel, fill in the tariff details:

·       Name – Type in a short name for the tariff object; this is the name you’ll see in the select menus.

·       Currency – Select the currency in which you will charge your customers.

NOTE: The currency for the tariff is only chosen once and cannot be changed later.

·       Service – Select the WiFi service.

·       Applied to – Select Customer.

·       Managed by – Select Administrator only here.

 

Create a customer tariff

 

3.     Click Save.

Enter rates

1.     On the customer tariff’s panel, click Rates.

2.     On the Add rate panel, fill in rate details:

·       Destination – Type the WiFi destination directly or select it from the list.

·       Rating mode – Select Flat rate here.

·      Interval  Type in 1 here.

·       Price  Type in zero here as your internet provider doesn’t charge you based on session time.

·       Effective from  If you want this rate to take effect sometime in the future, you can either type in a date manually, or use the calendar (click on the DD-MM-YYYY link).

NOTE: When using the calendar, you can specify that the date you are entering is in a different time zone than your present one. PortaBilling® will then automatically adjust the time.

Add rates

 

3.     Click Save.

Create a destination group set

At this stage you must create a destination group set to use for your volume discount plan configuration.

 

1.     On the navigation menu to the left, select Service catalog, Rate codes and click Destination group sets.

2.     On the Create destination group sets panel, fill in the required information:

·       Name – Type in a descriptive name for the destination group set (e.g. WiFi access);

·       Type – Leave the default type Regular.

 

Create a destination group set

 

3.     Click the Save button to save the destination group set.

Create a destination group

Now you need to create one destination group.

 

1.     After saving a destination group set, the Destination group page opens.

2.     On the Create destination group panel, type in the destination group name and provide a short description.

 

Create a destination group

 

3.     Click the Save button to save the destination group.

Assign destinations

1.       On the Destination group page, click the default All destinations group.

2.       On the Search filters panel select Custom from the Format list, type in WiFi to find the desired destination and click Apply filters.

3.       On the Destination list panel select the WiFi prefix and click Assign to group.

 

Assign destinations

 

4.       Select the destination group (WiFi in our example) and click Assign.

 

Assign destinations

 

5.       Click Save.

Create a volume discount plan

A volume discount plan contains all quotas and / or service wallets that you provide your customers. At this stage, you need to create two volume discount plans: one to provide free quota and another to provide prepaid access options.

 

1.     On the navigation menu to the left, select Service catalog, then Bundles and click Volume discount plans.

2.     On the Create discount plan panel, fill in the volume discount plan details.

·       Name – A short descriptive name for this volume discount plan.

·       Currency – Select the currency you use to charge your customers.

NOTE: The currency for the volume discount plan may only be chosen once (at creation) and cannot be changed later.

·       Apply discounts to – Leave the default value Individual combinations of Services/Destination Group here.

·       Destination group set – Choose the destination group set you created in the previous steps.

·       Destination group lookup type – Select Same destination as rate here.

·       Managed by – Leave the default Administrator only value here.

·       Description – Specify an extended discount description.

 

Create a volume discount plan

 

3.     Click Save.

Define a quota within the volume discount plan

1.     While on the Edit discount plan panel, click the VDP configuration link.

2.     On the Create volume discount group panel fill in the following information:

·       Type – Select Quota.

·       Service – Select WiFi here.

·       Volume measured – Select Service used, minute.

·       Destination group – Select the destination group from the list that this discount will apply to.

·       Reset threshold counters – Select Daily.

 

Define a quota

 

3.     Click Save. The Quota panel opens.

4.     Click Thresholds and specify 30 for the Peak period threshold.

 

Configure thresholds

 

5.     Switch to the Notifications panel and specify when a user receives a notification that the quota expires (e.g. 5 minutes before quota expiration).

6.     Click Save to save your changes.

Configure a service wallet

Paid service access options are available for users within a service wallet.

1.     Repeat the Create a volume discount plan step and create a volume discount plan to store the service wallet in.

 

Configure a service wallet

 

2.     On the Create volume discount group panel fill in the following information:

·       Type – Select Service wallet.

·       Service – Select WiFi here.

·       Volume measured – Select Service used, minute.

·       Destination group – Select the destination group from the list that this discount will apply to.

 

Configure a service wallet

 

3.     Click Save. The Service wallet panel opens.

4.     Click Top-up configurations and define top-up options (in our example, for 60 and 120 minutes).

 

Configure a service wallet

 

5.     Click Save.

Create a main product

To access your services, accounts will be created for your users and assigned specific products. Products are a powerful tool to define different ways to bill an account. Product definition is always realized through these steps: product definition, service definition and configuration and then the rating list is created.

 

1.     On the navigation menu, select Service catalog and click Products.

2.     On the Create product panel, fill in the product details:

·       Name – Type in a short name for the product object; this is the name you will then see in the select menus.

·       Name visible to end users – Specify the name of this product that your customers will see on their self-care interface.

·       Product type  Select Main product here.

·       Currency – Choose a currency the product will be priced in.

·       Managed by – Select Administrator only here, since we are setting up a service without the involvement of resellers.

·       Account default ACL – Choose an Access Control List (ACL) for accounts with this product assigned. ACLs control which objects end users can gain access to and which actions they can perform.

·       Account role – Select Universal from the list.

3.     Click Save.

 

Create a product

Included services

Define which service types are included in the product. A service type is a description of the physical service provided to end users.

 

To add a service type:

1.     On your product’s panel, click Services.

2.     On the Services panel, click Add a service.

3.     In the Select services to add dialog box, select WiFi access and click Add.

 

Add a service

 

4.          Click the WiFi link to limit WiFi bandwidth. Specify maximum upload / download speed.

 

Specify maximum upload / download speed.

Usage charges

The rating list has two functions: it defines the access points permitted (nodes and access numbers) and specifies which tariff must be used for billing in each of these points.

 

1.     On your product’s panel, click Charges, then click Usage charges.

2.     On the Usage charges panel, click Add.

3.     Fill in the required information:

·       Service – Select WiFi.

·       Node – Select the Huawei BRAS node.

·       Access code – Leave this field empty for the basic SIP service.

·       Tariff – Select the WiFi tariff you created before.

4.     Click Save.

 

Configure usage charges

 

5.     Click General info and associate the volume discount plan with the free quota with this product.

 

Select default discount plan

 

6.     Click Save to save the changes.

7.     Repeat steps 1-4 and create another main product with the Voucher account role. This product is only required to generate vouchers. Therefore, you can use the same tariff you created in previous steps for definitions of usage charges.

 

Create a product with voucher account role

Create an add-on product

1.     Click the  arrow icon to return to the Products panel.

2.    On the Create product panel, fill in the product details:

·       Name – Type in a short name for the product object; this is the name you will then see in the select menus.

·       Name visible to end users – Specify the name of this product that your customers will see on their self-care interface.

·       Product type  Select Add-on product here.

·       Priority – Specify the product’s priority.

·       Currency – Choose the currency the product will be priced in.

·       Managed by – Select Administrator only here, since we are setting up a service without the involvement of resellers.

·       Account default ACL – Choose an Access Control List (ACL) for accounts with this product assigned. ACLs control which objects end users can gain access to and which actions they can perform.

·       Account role – Select Universal from the list.

 

Create an add-on product

 

3.     Click Save.

4.     On the product panel that opens, click Charges, then General info and select the volume discount plan with the service wallet from the Default discount plan list.

 

Create an add-on product

 

5.     Switch to the Additional information panel.

6.     Click the Add product button in the Add-on product is allowed with section and select the main product you just created.

 

 

7.     Click OK.

8.     Click Save to save the changes.

Create a customer

In this case, the customer record is used to store vouchers and accounts to be created for your WiFi users.

 

1.    On the navigation menu, select Sales, then select Customers.

2.    On the Create customer panel, fill in the customer details:

·       Name – Type a short name for the customer object; this will be used on the web interface.

·       Business model – A business model defines what type of service is to be provided to the customer. Select Universal for this customer.

·       Customer class – Customer class allows you to define a policy for automated payment collection. Since you will not issue invoices nor collect payments for this customer, leave the Default customer class here.

·       Billing period – Choose a billing period for the customer. A billing period defines the frequency of invoicing for this customer. Leave the default monthly value here.

·       Billing period time zone – Choose a time zone where customer’s billing period will be closed and invoices will be generated.

·       The last day of the billing period – This is a read-only field available only during customer creation. It shows the last date of the customer’s first billing period. Note that this date is shown in the customer’s time zone.

·       Balance control – Specify the way the customer will pay for the service. Select Prepaid in this field.

·       Currency – Choose the currency in which this customer will be billed.

·       Available funds – Since this customer is used as a placeholder for storing accounts, the number amount of available funds is insignificant. Type zero here.

 

Create a customer

 

4.     Click Save.

Generate vouchers

Vouchers grant users access to your paid access options. To differentiate between WiFi access options, generate vouchers in separate batches according to the top-up options you defined for your service wallet. Give descriptive names to these batches to keep your vouchers well organized (Examples of batch names: “$10 for 60 minutes”). The voucher opening balance must be the same as the fee value you defined within the service wallet top-up options.

 

For more information about batch management, please read the Provisioning Prepaid Accounts section.

 

In our example, we will generate two batches for vouchers, one for 60-minute access and another for 120-minute access. The voucher opening balances are $15 and $20, respectively.

 

1.     On the customer panel that opens, click Accounts.

2.     Switch to the Create account panel and click Account generator.

3.     Specify the account generation parameters:

·       Account role – Select Voucher.

·       Product – Select the main product you created for voucher generation.

·       Quantity – Define the number of vouchers to generate.

·       Batch – Specify the batch name.

 

Generate vouchers

 

·       Switch to the Optional configuration tab and define the Opening balance value (e.g. 10).

·       Requires manual activation – Leave this option disabled to generate vouchers with the active status.

·       Service password – Select Empty from the list.

·       Life cycle – Specify the activation / expiration dates for the vouchers using the calendar. By default, vouchers are active for 90 days after their activation date.

 

Generate vouchers

 

·       ClickGenerate.

NOTE: Account generation tasks are executed every few minutes, so it may take a while to generate large numbers of accounts.

4.     Repeat step 3 and generate another batch of vouchers for 120 minutes of WiFi access. Specify $15 as the opening balance.

_Hint_ExclamationMark Notification about the generated cards will be sent by email to the user who created them. A CSV file with information about the new accounts will be attached.

Create a root user

When a user registers for the service, the signup module creates an account for the user in PortaBilling® via the API. To make this happen, you must provide the API access to the PortaBilling® web server by creating the user with root permissions.

 

1.     From the navigation tree, select My company, Access control and then Users.

2.     On the Create user panel, fill in the new user details:

·       Login – Specify the login for this user.

·       Password – Specify the password for this user.

·       Email – Type in your email to receive the user credentials upon creation.

·       Role – Define the access role for this user. Select Root from the list.

 

Create a root user

 

3.     Click Save. The User panel opens.

4.     Select Web self-care panel and enable the API token access option. The API token is now generated.

 

Configure the web self-care

 

5.     Click Save.

Configure the captive portal on the Configuration server

1.     On the Configuration server web interface, clone the currently active configuration to modify it.

2.     From the Configuration tree, select ClusterSuite -> WebCluster.

3.     Select the CaptivePortal group and configure these options:

·       enabled – Set Yes.

·       nasHost – Specify the IP address of your BNG.

·       nasPort – Specify the port on your BNG (the default one is 2000).

·       nasSecret – Specify the authentication key for communication with PortaBilling® via Huawei portal protocol V2.0. It must be the same as the one you defined during the BNG configuration.

·       pbAdminLogin – Specify the login of the user you created for the API access to PortaBilling®.

·       pbAdminToken – Specify the API token generated for the user.

·       pbProductId – Specify the internal ID of the main product (i_product) you created for WiFi access (WiFi signup in this example).

·       pbAddonId – Specify the internal ID of the add-on product (i_product)  you created in the previous step (Paid options in this example).

·       pbCustomerId – Specify the internal ID of the WiFi card owner (i_customer).

·       uiCompanyName – Define your company name. Users will see it on the captive portal page.

·       uiConditionsInfo – Specify your terms of use here.

 

Configure the captive portal on the Configuration server

 

 TIP: To find the internal ID of the customer and products, connect to PortaBilling® via the API and call these API methods:

 

To find the ID of the main product:

-curl https://<your_web_server>/rest/Product/get_product_list

-d auth_info='{"session_id":"session_ID"}'

-d params='{"name":"WiFi signup"}'

 

To find the ID of the add-on product:

-curl https://<your_web_server>/rest/Product/get_product_list

-d auth_info='{"session_id":"session_ID"}'

-d params='{"name":"WiFi access options""}'

 

To find the ID of the customer:

curl https:// <your_web_server>/rest/Product/get_product_list

-d auth_info='{"session_id":"<session_ID>"}'

-d params='{"name":"WiFi access options"}'

 

Alternatively, you can find the internal ID number via the web interface: they are the last digits in the URL when you open a record.

 

4.     Click Verify to verify the configuration.

5.     Click Check/Apply to apply the configuration.

 

 Note that the Apache service will need to be restarted, therefore apply the configuration during off-peak times.

Testing

1.     Connect to WiFi from your device.

2.     You are redirected to the captive portal page.

3.     Accept the terms of use.

 

 

4.     Enter your information for signup and click Sign Up.

 

 

5.     Your WiFi access credentials are returned. Store them somewhere so you can log in later and then click Close.

 

 

6.     Select the Use PIN option and enter a voucher PIN.

 

 

7.     Click Submit.

8.     You are now connected to WiFi and can see your remaining time.