OPNsense Integration
Integrating Captivo with the OPNsense Captive Portal
Requirements: OPNsense 23.1+ and an active LAN/WLAN interface
For the Active Sessions list to work: enable RADIUS accounting (port 1813) AND make the device send periodic accounting updates. Captivo treats a session as live while the device keeps signalling it; if only a start and a stop are sent, a guest who is still online drops off the list after 10 minutes while the device's own screen still shows them. The setting is usually called Interim, Accounting Interim Update or Update Interval; one minute is a good value.
Bandwidth limit: The OPNsense Captive Portal does not apply the
Workaround: There are two ways to limit speed on the OPNsense side:
WISPr-Bandwidth-Max-Down/Upattributes received over RADIUS. Even if you set a download/upload speed in your Captivo profiles, OPNsense ignores these values.Workaround: There are two ways to limit speed on the OPNsense side:
- Services → Captive Portal → Zone → Edit → the Bandwidth fields
- Traffic shaping setup via Firewall → Shaper
1Defining the RADIUS Server
First, define the Captivo RADIUS server in OPNsense:
- Go to System → Access → Servers
- Click Add
| Field | Value |
|---|---|
| Descriptive name | Captivo RADIUS |
| Type | RADIUS |
| Hostname or IP | Captivo RADIUS server address |
| Shared secret | Copy from Captivo |
| Authentication port | 1812 |
| Accounting port | 1813 |
To see live sessions in the Captivo dashboard, enable RADIUS accounting on the zone (point it at the same server, port 1813). Auth alone logs identity but not active-session stats.
2Creating a Captive Portal Zone
- Go to Services → Captive Portal → Administration
- Click + to add a new zone
| Setting | Value |
|---|---|
| Enabled | Checked |
| Interfaces | Your Guest or WiFi interface |
| Authenticate using | Captivo RADIUS (the one we created) |
| Idle timeout | 15 |
| Hard timeout | 480 |
3Template Settings
In Captivo, download the OPNsense template from Settings → Portal → Templates.
- Go to Services → Captive Portal → Templates
- Click + to add a new template
- Upload the file you downloaded from Captivo as-is — it is already a complete ZIP
The OPNsense download is already a ready-to-upload ZIP that contains
index.html plus its CSS and assets. Do not extract it or re-zip only the HTML — that would break the template. (Note: OPNsense uses a single ZIP, whereas pfSense uses two separate HTML files.)4Linking the Template to the Zone
- Go back to Services → Captive Portal → Zones
- Edit the zone we created
- In the Template field, select the template you uploaded
- Save and Apply
5Allowed Hosts
- Go to Services → Captive Portal → Allowed Hostnames
- Add the Captivo server domain
This step lets guests reach the Captivo server before authentication.
Troubleshooting
The template won't upload
- Check that
index.htmlis inside the ZIP file - The ZIP file must be smaller than 1MB
- Do not use special characters in the file name
Can't establish RADIUS connection
- Check the shared secret
- Verify that ports 1812 and 1813 are open in the firewall
- Ping the RADIUS server from OPNsense
For product-wide problems: The portal does not open · Sign-in is rejected · Sessions do not appear