Outdated
See the OPNsense configuration series .
 Captive Portal use cases
- Hotel, guesthouse, or cafe Wi-Fi with voucher or username management.
- Wi-Fi marketing pages that introduce a product after connection.
- Other guest-access workflows.
 Main features
- Login-page templates with URL redirects, pop-ups, and custom splash pages.
- Multiple zones, each with its own interface, template, port, or shared settings.
- Authentication through HTTPS, LDAP/Active Directory, RADIUS, local users, vouchers, or no authentication.
- Bandwidth management.
- See the OPNsense Captive Portal documentation for more features.
This guide configures a captive portal for
GUESTNET. If GUESTNET has not been created, see the VLAN and guest-network guide . A separate physical port can be used instead of a VLAN when the router has enough ports.
Configure the captive portal
- Open Services ‣ Captive Portal ‣ Administration.
- Click + to add a zone. Each interface needs its own zone; this example uses GuestNET VLAN 10.
| Field | Value | Notes |
|---|---|---|
| Enable | Checked | |
| Interface | GUESTNET | |
| Authenticate using | Nothing Selected | |
| Idle timeout (minutes) | 0 | 0 disables the timeout. |
| Hard timeout (minutes) | 0 | 0 disables the timeout. |
| Concurrent user logins | Unchecked | |
| SSL certificate | none | Use a certificate after configuring a domain. |
| Hostname | Empty | Leave empty without a domain. |
| Allowed Addresses | Empty | |
| Custom template | None | Use the default template. |
| Description | GuestNET |
- To add a template, open the Template tab, download the default template, customize it, zip it, and upload it. A sample template is available from this GitHub project .
- Preview the portal at
http://<OPNsense-IP>:8000.
The firewall must allow access to the captive-portal login page. See the rules in the
VLAN and guest-network guide
.
Limit guest bandwidth
This example limits Guest download to 8 Mbps and upload to 1 Mbps.
The limit is shared between Guest clients. With seven clients, each may receive roughly 8/7 = 1.1 Mbps under equal demand. A common starting point is one-third to one-half of the Internet plan.
See the
OPNsense traffic-shaper documentation
for per-client limits.
- Open Firewall ‣ Shaper ‣ Pipes and add a download pipe:
| Field | Value |
|---|---|
| Enable | Checked |
| Bandwidth | 8 Mbit/s |
| Mask | Destination |
| Description | pipe_8Mbps_down |
Click Save Changes. Create an upload pipe with 1 Mbit/s and description pipe_1Mbps_up.
- Open Firewall ‣ Shaper ‣ Rules and add a download rule:
| Field | Value |
|---|---|
| Interface | WAN |
| Interface 2 | GuestNET |
| Direction | in |
| Target | pipe_8Mbps_down |
| Description | Limit Guest Download to 8 Mbps |
Create a second rule with direction out, target pipe_1Mbps_up, and description Limit Guest Upload to 1 Mbps.
Click Save Changes and Apply.
For voucher, ticket, or username authentication, see the
OPNsense guest-network guide
.


Góp Ý / Bình Luận / Đánh giá