User Tools

Site Tools


pfsense:captive_portal:configure_captive_portal

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 Interfaces to have the Captive Portal. These are usually LAN or a VLAN.

Here is instructions against the GUEST VLAN.

  • Navigate to Interface → Assignment → VLAN.
  • Click Add.

Configure the VLAN on the desired interface.

  • Parent Interface: em1.
  • VLAN Tag: 99.
  • VLAN Priority: 0. The default.
  • Description: GUEST.

Add an interface with the VLAN just created.

  • Navigate to the Interfaces → Assignments.
  • 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: GUEST.
  • 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.99.100 - 192.168.99.199.

Create and enable the Captive Portal.

  • Navigate to Services → Captive Portal.
  • Click Add.
  • Enable the service by giving it a zone 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 Interfaces on which to enable the captive portal. In our example we will select GUEST.

  • Interfaces: GUEST.

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


References

pfsense/captive_portal/configure_captive_portal.txt · Last modified: 2023/05/21 12:26 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki