This is an old revision of the document!
PFSense - Captive Portal - Configure Captive Portal
A Captive Portal allows access for specific authorized users, or through a temporary configurable voucher (usage time, allowed speed, …).
Configure
Identify one or more network cards on which the Captive Portal will be controlled. These can be the normal LAN or a VLAN.
Here is instructions for a VLAN.
- Navigate to Interface → Assignement → VLAN.
- Click Add.
Configure the VLAn on the desired interface.
- Parent Interface: igb1.
- VLAN Tag: 25.
- VLAN Priority: 0. The default.
- Description: VLAN 25.
Add an interface with the VLAN just created.
- Navigate to the Interfaces → Assignements.
- Select in the drop down menu of Available network ports the newly created VLAN then click on Add.
An interface with the initial name OPT will be created. Click on it to enable and configure it.
- Enable: Checked.
- Description: VLAN 25.
- IPv4 Configuration Type: Static IPv4.
Configure DHCP.
- Navigate to Services → DHCP Server.
- Select the tab of the newly added Interface and configure DHCP as you wish.
- Enable: Checked.
- Available Range: 192.168.25.100 - 192.168.25.200.
Create and enable the Captive Portal.
- Navigate to Service → Captive Portal.
- Click Add.
- Enable the service by giving it a name, such as “Guest Voucher”
- Click on Save & Continue.
- Enable: Checked. Enable Captive Portal.
- Description: Voucher per Guest.
At this point, on the Configuration tab, select the network or networks on which to enable the captive portal. In our example we will select VLAN25.
- Interfaces: VLAN25.
Further down the page, select the type of authentication. In our example we will use local users at the firewall.
- Authentication Method: Use an Authentication backend.
- Authentication Server: Local Database.
From the Vouchers tab, create all the vouchers that are wanted with the Add button.
- Roll: 6. The complexity of the voucher.
- Minutes per Ticket: 120. The minutes of connections allowed with the use of these vouchers.
- Count: 30. How many vouchers to generate.
- Comment: Guest Voucher.
- Click Save.
Export the vouchers by clicking on the X icon.
An example of an exported file:
If someone connects on VLAN 25, this will send them to the Captive Portal page; asking them to authenticate a local user or enter a voucher.
If we go to the active user tab we will see the active vouchers, with the possibility to see detailed information by hovering over the username.