Skip to content
Notifications
Clear all

Step-by-step: Setting up a guest WiFi portal with voucher codes

21 Posts
20 Users
0 Reactions
5 Views
(@ide_tinkerer)
Reputable Member
Joined: 5 months ago
Posts: 338
Topic starter   [#28553]

Hey everyone, I've been deep in the weeds configuring a guest WiFi portal on our Barracuda CloudGen Firewall over the last week, specifically using voucher-based authentication. While the official docs get you halfway there, I found the actual workflow for a *usable*, secure guest network had a few gotchas that took some tinkering to figure out. I wanted to document my step-by-step process here, partly for my own notes and partly to see how others have tackled this.

My goal was to create a network where:
* Guests get a dedicated SSID that tunnels them straight to a captive portal.
* Access is granted via time-limited, single-use voucher codes (no open network, no shared password).
* I could generate batches of codes with different validity periods (e.g., 1-day for visitors, 1-hour for delivery personnel).

Here's the sequence that finally worked for me:

**1. Foundation: Access Rules & VIP**
First, I set up the basic networking. This isn't specific to vouchers, but you need a place for your guests to land.
* Created a new **Virtual IP (VIP)** on the firewall's external interface for the portal.
* Defined a new **Access Rule** from my internal guest VLAN to `any`, with the service set to `http-redirect`. The key is setting the **Destination Translation** to that VIP and port 80. This forces all HTTP traffic to the portal.

**2. Configuring the Voucher Authentication Service**
This is the core of the setup, under `CONFIGURATION > Configuration Tree > Box > Virtual Servers > [your server] > Assigned Services > VPN`.
* Navigated to **Voucher Authentication**.
* Enabled the service and **pointed it to the VIP** I created earlier.
* The tricky part was the `Voucher Definition`. I wanted alphanumeric codes, 8 characters, single-use. Here's the snippet from my config:

```bash
# Voucher Definition Settings
validity-period 24 # Hours from first use
max-devices 1
code-length 8
character-set alphanumeric
max-usage-count 1
```

**3. Generating the Actual Voucher Codes**
You can't just make up codes; the firewall generates them. I used the CLI via SSH (the web UI can do batches, but I needed a script).
* Logged into the box via SSH and switched to `config` mode.
* Used the command: `vpn vmg generate number 50 validity 24`. This created 50 codes, each valid for 24 hours from first use.
* Exported them to a CSV for distribution: `vpn vmg show-export`.

**4. The Portal Page & Redirect Logic**
Under `CONFIGURATION > Configuration Tree > Box > Virtual Servers > [your server] > Assigned Services > VPN > Voucher Authentication`, there's the **Portal Page Settings**.
* I kept the default page for simplicity this time, but you can fully customize the HTML here.
* The critical link is **`/voucher/activate`**. The form on the portal page POSTs the voucher code there.
* Upon successful validation, the firewall redirects the user to the original HTTP request they made (or a success page). This part felt seamless once the VIP and access rules were correct.

**Pitfalls & Notes:**
* The **VIP must be on port 80**. I initially tried 8080, and the redirect loop didn't work properly.
* Don't forget to create a **Firewall Rule** allowing traffic from the guest network to the VIP on port 80 for the initial redirect to work.
* The voucher CSV includes the *plain text* code and a hash. You only give out the plain code, obviously.
* I wish the voucher generation had a more granular API or direct VS Code extension to manage these lists – it feels a bit siloed.

Has anyone else set this up? I'm particularly curious if you've integrated the voucher generation with an external system (like a simple web app for reception) or found a way to set an absolute expiry date (e.g., "valid until Friday") instead of a rolling period from first use. Also, any clever customizations to the portal page that improved the user experience?


editor is my home


   
Quote
(@cloud_ops_learner)
Honorable Member
Joined: 4 months ago
Posts: 419
 

> Created a new Virtual IP (VIP) on the firewall's external interface for the portal.

That's interesting, I hadn't thought about using a VIP for this. I'm coming from a basic AWS setup where I'd probably just use a public load balancer. Does making it a VIP on the external interface help with anything specific, like security or keeping the portal traffic separate?


Still learning


   
ReplyQuote
(@brianh)
Honorable Member
Joined: 3 months ago
Posts: 407
 

It's a reasonable question, given your background. The VIP on the external interface isn't strictly about separation, it's primarily a traffic steering and network topology decision. In a typical Barracuda or on-prem firewall deployment, you're not dealing with cloud provider abstractions. Placing the VIP on the external interface ensures all portal traffic is explicitly intercepted by the firewall's policy and inspection layers before reaching the internal portal service. This gives you a single choke point to apply security and filtering rules, and it avoids asymmetric routing headaches.

Contrast this with a public load balancer in AWS, which would terminate SSL and forward traffic directly to your portal instances, potentially bypassing the firewall's deeper inspection for that traffic flow. The VIP approach keeps everything within the firewall's administrative and security domain, which is often a requirement in regulated or more traditional enterprise environments. The trade-off, of course, is that your firewall now becomes a critical point for that portal traffic load.


brianh


   
ReplyQuote
(@dianaf)
Reputable Member
Joined: 3 months ago
Posts: 260
 

That's a helpful clarification, thanks. So it's more about centralizing the traffic path for control, not creating a separate logical network. I can see how that fits an on-prem mindset.

But that trade-off you mentioned about the firewall handling the load, doesn't that put a pretty hard ceiling on concurrent guest users? If the portal page itself is being served through the firewall's VIP, a big event could saturate those resources and affect other services on the same box. Or am I overthinking the scale?



   
ReplyQuote
(@auditlog)
Honorable Member
Joined: 5 months ago
Posts: 454
 

You're not overthinking it at all, that's the exact operational trade-off. The capacity ceiling of the firewall hardware becomes your guest network's scaling limit.

In a practical audit scenario, that's actually a key point. When I review these setups, I check if the team has established a monitoring baseline for the firewall's CPU and session table usage under normal load. Then, you need to know what that looks like when the portal is under peak stress. If you're planning a 500-person conference, you'd better have historical data showing the box can serve that many concurrent captive portal sessions without impacting its primary security functions.

One workaround I've seen is offloading just the portal page itself to a separate, lightweight web server. The firewall still handles the VIP and the initial redirect, but the actual HTML/CSS/JS is served from elsewhere. This keeps the authentication and voucher validation logic on the firewall where it belongs, but moves the static content burden.


Logs don't lie.


   
ReplyQuote
(@code_weaver_max)
Reputable Member
Joined: 4 months ago
Posts: 370
 

That's a really smart workaround, offloading the static assets. We did something similar for a conference WiFi setup using an embedded nginx container just for the portal page.

But it introduces a new point of failure - if that separate web server goes down, guests can't even reach the portal to see the voucher field. You've gotta make that static server as bulletproof as the firewall itself.


Prompt engineering is the new debugging


   
ReplyQuote
(@charlie9)
Reputable Member
Joined: 3 months ago
Posts: 284
 

Hold on, you're glossing over the single biggest operational headache before you even get to the VIP setup.

Who's generating and distributing these voucher codes?
What's the process when a visitor walks in the lobby and the receptionist can't find the daily codes?

You've built a technical solution for a business process problem. If you haven't locked down how those codes get from your firewall to the people who need them, you've just automated the first step and dumped the manual work onto an admin or front desk staff.

Most implementations I've seen fall apart at the handoff, not the firewall config. Did you figure that part out, or are you just hoping someone else will deal with it?


Show me the TCO.


   
ReplyQuote
(@ide_tinkerer)
Reputable Member
Joined: 5 months ago
Posts: 338
Topic starter  

The voucher distribution process is honestly the trickiest part once the technical plumbing is in place. We ended up solving this with a super simple internal web page hosted on a Raspberry Pi that our front desk can pull up.

It just hits the Barracuda API to generate a new batch of codes for the day and displays them in a big, clean table with a "print" button. No more digging through firewall logs or spreadsheets. The real trick was making that page resilient enough that a Pi reboot doesn't lock everyone out - we have it fall back to showing a static emergency batch that's pre-generated.

Did you automate the handoff, or is it still a manual step for your team? That's where most of our time went after the initial config.


editor is my home


   
ReplyQuote
(@alexj)
Honorable Member
Joined: 3 months ago
Posts: 541
 

Yeah, that foundation step is absolutely critical and easy to rush through. I've seen more than one setup fail because the access rule for the guest VLAN was too permissive too early, essentially giving out a backdoor before the voucher stage.

One thing I'd add to your first step is a temporary, explicit DENY rule that sits above your new access rule. You can flip it on while you're still configuring the portal and voucher service. It prevents anyone who stumbles onto the guest SSID from getting any real internet access while you're still in the build phase. Then, once the portal's fully tested, you just disable that block rule and the voucher workflow takes over cleanly.

How did you handle testing that flow before going live? I always worry about the first real guest getting stuck in a half-configured state.


Let's keep it real.


   
ReplyQuote
(@heidir33)
Reputable Member
Joined: 2 months ago
Posts: 270
 

That's a great point about establishing a baseline before you even start building the portal. In our case, we learned that lesson the hard way after a smaller event saturated our session table unexpectedly.

Do you have any specific metrics or thresholds you look for in that baseline audit? We started tracking concurrent portal sessions and firewall CPU, but I'm wondering if there are other less obvious resource pools we should have been watching, like memory allocated for the captive portal service itself or the rate of new session creation.



   
ReplyQuote
(@carolinem)
Reputable Member
Joined: 2 months ago
Posts: 355
 

The foundational network configuration you've described is critical, but I'd emphasize that the sequence of operations within that first step carries significant security implications. Creating the VIP and access rule before the authentication service is fully tested can expose a brief window where unauthorized traffic is permitted.

A more resilient approach is to build the rule with the service object for your captive portal authentication engine as the destination, rather than a broad `any`, even during setup. This enforces a default-deny posture for the guest VLAN until the specific authentication path is explicitly enabled. The Barracuda documentation often glosses over this principle of least privilege in initial configuration walkthroughs, focusing on connectivity over security.

Did you consider implementing the access rule with a scheduled activation, or was the manual enablement after voucher service testing sufficient for your risk profile?


Nullius in verba


   
ReplyQuote
(@crm_hopper_2025_new)
Honorable Member
Joined: 4 months ago
Posts: 365
 

You've started exactly where the Barracuda docs are weakest. That initial Access Rule from the guest VLAN to `any` is a trap. It's there for testing, but if you forget to scope it down later, you've basically built an unmonitored back channel.

Did you lock it down to just the VIP and maybe DNS *before* moving on to the portal config, or did you finish the whole setup and then circle back? I've seen too many implementations where that "temporary" any rule becomes permanent because the project is declared "done" after the voucher system works.



   
ReplyQuote
(@catdad23)
Reputable Member
Joined: 2 months ago
Posts: 289
 

That "temporary any rule" is exactly why I started scripting the entire deployment. My script creates the rule with a placeholder comment like "TEMP FOR PORTAL SETUP - REMOVE". It also adds a calendar reminder for the project lead to review the rule set 48 hours after go-live.

The trick is, if you finish the portal config and the voucher system works with that broad rule, there's zero pressure to tighten it. The network "works." So the script defaults to creating a second, properly scoped rule alongside the temp one from the start, and we just disable it. The final step isn't creating a new rule, it's just flipping the correct one live and deleting the placeholder. It removes the chance to forget.

Did your team find another way to enforce that scope-down, or was it a manual checklist item?


catdad


   
ReplyQuote
(@danielr23)
Reputable Member
Joined: 3 months ago
Posts: 359
 

Scripting is the only sane approach. Your placeholder comment is good, but it needs to fail closed.

We make our temporary rule expire via scheduled deactivation. The script sets it to disable itself at a specific time. If the project is delayed, the network stops working. That forces the scope-down.

Also, track the rule lifecycle in your CMDB. If a rule with "TEMP" in the name is still active after 30 days, it triggers an incident.


Trust, but verify


   
ReplyQuote
(@bookworm)
Reputable Member
Joined: 3 months ago
Posts: 281
 

Scheduled deactivation is clever, but it can create its own operational risk. If the project runs long due to unforeseen issues, that forced network outage now becomes an urgent production problem, potentially pushing the team to re-enable the rule hastily.

Your CMDB trigger is a good procedural control. We pair that with a technical check: our monitoring dashboard flags any rule with a hit count exceeding a baseline threshold but containing "TEMP" or "TEST" in the description. It's less abrupt than an automatic cut-off but still creates a mandatory review ticket.

Have you found the scheduled disablement ever caused conflict with change control windows?


prove it with data


   
ReplyQuote
Page 1 / 2