pfSense Setup

Configure Captive Portal Zone

This section explains how to configure the Captive Portal Zone, integrate RADIUS MAC authentication, and enable HTTPS login for WiZone.

Step 1 – Add Captive Portal Zone

After uploading the HTML login page, configure the Captive Portal Zone to integrate with your RADIUS authentication.
  1. Go to Services → Captive Portal → Add.
  2. nter the following:
FieldValue
Zone NameWiFi_Lobby
Zone DescriptionGuest Wi-Fi


Step 2 – Configure Captive Portal Settings

  1. Enable Captive Portal and edit the zone you just created.
  2. Configure the basic options:
FieldDescription
Enable Captive PortalCheck this option
Idle Timeout (Minutes)(optional) disconnect inactive clients
Traffic Quota (MB)Leave blank for unlimited
Concurrent LoginsMultiple
MAC FilteringDisable if RADIUS MAC is used
Custom Portal PageEnable to use your own HTML/PHP login

  1. After enabling Custom Portal Page, download the WiZone login portal files from WiZone Portal
  2. Upload login_portal.html into the Portal page contents section.


Step 3 – Authentication – Use RADIUS MAC Authentication

Configure the Authentication tab as shown:

FieldExample / ValueDescription
Authentication MethodUse RADIUS MAC AuthenticationDevices authenticate automatically using MAC address
Authentication Serverrad_wizoneSelect your RADIUS server
RADIUS MAC SecretpasswordShared secret for MAC authentication
Login Page Fallback(check the box)Enable redirect to login page if MAC auth fails
Session Timeout(check the box)Use RADIUS Session-Timeout to disconnects client after session expiry
Traffic Quota(check the box)Use RADIUS pfSense-Max-Total-Octets to apply bandwidth usage limits
Per-User Bandwidth Restrictions(check the box)Apply RADIUS-based upload/download limits
MAC Address FormatDefaultUses standard MAC format for compatibility

Make sure your RADIUS server ( e.g., rad_wizone ) is added under Authentication Servers before proceeding.

Step 4 – Accounting Options

FieldValueDescription
Send RADIUS Accounting Packets(check the box)Logs session time, usage, and disconnections
Accounting Serverrad_wizoneSelect your WiZone RADIUS server
Send Accounting UpdatesInterimSends periodic usage updates to RADIUS
Interim Update Interval(optional)Define how often usage updates are sent


Step 5 - HTTPS Options

FieldValueDescription
Enable HTTPS Login(check the box)Protects user credentials during login
HTTPS Server Namecaptive.wizone.ioMust match SSL certificate Common Name
SSL/TLS Certificatecaptive.wizone.ioSelect the imported SSL certificate
Disable HTTPS ForwardsLeave uncheckedAllows redirect from HTTP to HTTPS login page

⚠️ Reminder: Ensure the DHCP server is enabled on the captive portal interface and DNS Resolver or Forwarder is active so unauthenticated clients can resolve hostnames.


Step 5 – Update Required System Files for WiZone Login

WiZone requires several backend files to enable secure API calls and Captive Portal integration.
Because pfSense does not allow uploading PHP/system files directly through the UI, you must manually update them using the file editor located at Diagnostics → Edit File.

You can download the required files from the WiZone Portal → Device Configurationsection.
The download package includes all files you need, including path.txt which shows the exact pfSense locations for each file.

5.1 Locate File Paths from path.txt

Inside your WiZone setup package, you will find a file named path.txt.
This file lists the exact system paths where each file must be replaced. For example:

/usr/local/www/wizone/api-pfsense-lib.php
/usr/local/etc/inc/captiveportal.inc
/usr/local/www/wizone/utils_captive.php

5.2 Open the File Editor in pfSense

  1. Go to Diagnostics → Edit File.
  2. Click Browse to navigate through the filesystem.
  3. Use the paths from path.txt to locate each file.
  4. Copy the entire file content.
  5. Paste it into the pfSense editor window.
  6. Click Save.

Repeat this process for:

  • api-pfsense-lib.php
  • captiveportal.inc
  • utils_captive.php

⚠️ Important:
These files are part of pfSense’s Captive Portal logic.
Make sure you paste the content exactly as provided — no missing lines, no extra spaces.