Join our Newsletter — 33% off our NHI Course
Home› Guides› Firewall user authentication and captive portals: Build identity…
Guide Network Security

Firewall user authentication and captive portals: Build identity aware rules users cannot bypass

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 28 October 2026 15 min read
On this page

Firewall rules written against IP addresses stop meaning anything once laptops roam, users share terminal servers and guests join the same subnet, so most next generation firewalls now authenticate the person or device behind the traffic. This guide explains how firewall user authentication works in practice: passive identity mapping, active captive portals, the standards based Captive Portal API, and how each feeds identity aware security rules. It covers the design decisions that decide whether the result is trustworthy, how to roll it out without locking people out, and how to detect abuse of the mappings and the service accounts behind them. It is written for network and identity engineers who run firewalls, wireless and remote access, and assumes the general rule lifecycle covered in the Firewall Management Guide.

Key takeaways

  • An identity aware rule is only as good as its mapping. The firewall still sees IP addresses; user rules depend on an IP to user table that can be stale, spoofed or shared, so the mapping source matters more than the rule syntax.
  • Prefer authoritative passive sources, use the portal as the fallback. Domain controller and identity provider events, VPN logins and NAC give mappings without user friction; a captive portal catches the devices those sources miss.
  • Captive portals are credential collection pages. They need a trusted TLS certificate, a hostname users can recognise, MFA where the resource justifies it, and no cleartext methods such as HTTP Basic on untrusted segments.
  • The mapping agents are privileged non-human identities. Directory read accounts, WMI probing accounts, RADIUS and LDAP bind credentials and XML API keys live on the firewall and must be scoped, vaulted and rotated like any other service account.
  • Timeouts are security controls. Mapping timeouts, portal timers and re-authentication intervals decide how long a stolen or reassigned IP keeps someone else's access.

How firewall user authentication works

Every vendor implements the same three building blocks under different names. A mapping table records which user (and often which groups) currently sits behind an IP address. A group mapping process reads directory groups so rules can reference "Finance" rather than individual names. A policy engine matches traffic to rules that include a user or group column, alongside the usual zones, addresses, applications and services.

Palo Alto Networks documents nine User-ID mapping methods: Server Monitoring, Port Mapping, Syslog, XFF Headers, Username Header Insertion, Authentication Policy and Authentication Portal, GlobalProtect, XML API and Client Probing. Cisco Secure Firewall Management Center groups the same idea into passive identity sources (ISE or ISE-PIC and the TS agent for terminal servers) and active sources (captive portal and remote access VPN), with an identity policy whose rules assign each flow a realm and an authentication method of passive, active or none. Whatever the product, the questions are the same: where does the mapping come from, how fresh is it, and what happens to traffic that has no mapping.

Mapping sourceHow it learns identityStrengthMain weakness
Directory or domain controller logon eventsReads authentication events (for Windows, Security event 4624 with the logon type) and maps the source IPNo user interaction, covers domain joined Windows wellMisses non-domain devices; network logons (type 3) from servers can map the wrong user
Identity provider, NAC or RADIUS accountingReceives session data from 802.1X, ISE style NAC or Wi-Fi controllersAuthoritative for wired and wireless access, includes device postureOnly as good as the NAC deployment and its accounting stop messages
VPN client loginThe VPN gateway knows who owns each tunnel addressStrong and per session for remote usersOnly covers traffic inside the tunnel
Syslog parsing or XML or REST APIThird party systems push login events or mappingsFlexible, covers proxies, Linux and custom systemsAny system holding the API key can write arbitrary mappings
Terminal server agentAssigns each user a port range on a shared hostDistinguishes many users behind one IPExtra agent to patch; failure collapses everyone to the host identity
Captive or authentication portalRedirects unmapped web traffic to a login pageWorks for any device with a browserUser friction, breaks non-browser traffic, attracts phishing and spoofing
Client probing (WMI)Agent queries endpoints with a service accountFills gaps on legacy Windows estatesSends the probing account's credentials to endpoints; vendor advises disabling

Captive portals: modes, methods and the standards

A captive portal intercepts traffic from an unauthenticated device and redirects it to a login or acceptance page. In an enterprise firewall this is an authentication portal that adds a mapping once the user signs in. On guest and public networks it is usually a venue portal that collects acceptance of terms, a voucher or payment before releasing the device.

Authentication methods

  • Web form: the portal page collects a username and password, then hands off to further factors. In PAN-OS the Authentication Portal web form is the first factor and additional factors (push, OTP, SMS, voice) are presented on a separate MFA login page, after which Security policy decides access.
  • Transparent Kerberos or Negotiate: domain joined browsers authenticate silently with Kerberos tickets. Cisco's HTTP Negotiate option lets the portal choose Kerberos, NTLM or Basic, and Kerberos requires a directory join account on the realm. This is the least friction option, but it inherits Kerberos hygiene: a protected service principal and a rotated keytab. See the Kerberos Security Guide.
  • NTLM: transparent for configured browsers on Active Directory realms, but NTLM is relayable and on a deprecation path. Treat it as a migration item. See the NTLM Deprecation and Elimination Guide.
  • HTTP Basic: Cisco's documentation describes it as unencrypted, with users logging in through the browser pop-up. Never offer it without TLS, and avoid it on any segment an attacker can sniff.
  • SAML or OIDC single sign-on: the portal redirects to the corporate identity provider, which enforces MFA and conditional access centrally. This keeps passwords off the firewall entirely and is the preferred option when the firewall supports it. See the Identity Provider and SSO Security Guide.

The IETF Captive Portal API

Classic portals rely on intercepting HTTP and redirecting the browser, which breaks with HTTPS everywhere, HSTS and operating system captive network assistants. The IETF CAPPORT work replaces interception with discovery. RFC 8910 (Standards Track) defines DHCP, DHCPv6 and Router Advertisement options that tell the device the API URI. RFC 8908 (Standards Track) defines the API: a JSON document of media type application/captive+json with a required captive boolean and optional user-portal-url, venue-info-url, can-extend-session, seconds-remaining and bytes-remaining. RFC 8952 (Informational) describes the architecture: user equipment, provisioning service, API server, enforcement device and user portal.

The security requirements are worth adopting even on proprietary portals. RFC 8908 requires TLS for all client to API traffic, a certificate the client can validate and check for revocation, and a name that matches the hostname the network supplied; if validation fails the client must not use the API. It recommends OCSP stapling, allowing revocation and time services through the enforcement device, and marking responses private or no-store. RFC 8952 adds that signals are only hints and should be rate limited, and that IP based identifiers need anti-spoofing because they can be forged.

Designing identity aware rules

  • Use groups, not users: reference directory groups in rules and manage membership in the identity system, so leavers lose network access when their account is disabled, not when someone edits the firewall.
  • Decide the unknown user behaviour explicitly: every product has a pseudo identity for unmapped traffic ("unknown", "Unknown" users in Cisco realm sequences, or a guest identity). Write a rule for it on purpose: redirect to the portal for web, deny for sensitive zones, and allow only infrastructure services such as DNS, DHCP and the portal itself.
  • Keep identity out of infrastructure rules: domain controllers, NAC, DNS and the portal must be reachable before anyone is mapped, otherwise users cannot authenticate to become mapped.
  • Separate servers from people: servers, printers, IoT and workloads do not log in through a portal. Give them address or tag based rules and keep them out of user mappings so a service logon cannot overwrite a human mapping. Machine identities should be governed as non-human identities, see the Network Access Control (NAC) Guide for device level identity.
  • Combine identity with application and zone: "Finance group may use the payroll application from the corporate zone" is a far smaller grant than "Finance group may reach the payroll subnet".
  • Re-authenticate for sensitive targets: put an authentication rule with MFA in front of admin interfaces, jump hosts and payment systems, with a short timeout, rather than relying on the mapping created at morning logon.

Timeouts that matter

TimerWhat it controlsGuidance
Mapping timeoutHow long an IP to user entry survives without refreshAlign with DHCP lease time on Wi-Fi; shorter on guest and shared segments so reassigned addresses do not inherit access
Portal session timerWhen portal users must sign in againPAN-OS evaluates the Authentication Portal timer alongside each rule timeout and prompts on whichever expires first, so set the portal timer equal to or above the longest rule timeout
Authentication rule timeoutHow long an MFA challenge stays valid for a protected serviceMinutes to a few hours for admin targets; the timestamp is tracked per factor, so different MFA providers are challenged separately
Guest or voucher sessionVenue access duration and data capExpose remaining time through the RFC 8908 seconds-remaining field where supported
Failed attempt thresholdFallback after repeated failuresCisco's option to identify users as guest after failed portal logins (default 3) is convenient; make sure the guest identity has guest level access only

Where identity fits: the service accounts behind the firewall

User aware firewalls quietly accumulate some of the most sensitive non-human identities on the network. Each one can either read the directory, write mappings or authenticate as the firewall.

  • Directory read and event log accounts: agents that read domain controller security logs need membership of a log reader role, not Domain Admins. Check for legacy agents installed years ago under an administrator account.
  • Client probing accounts: Palo Alto Networks "strongly recommends disabling client probing" and warns that enabling it on external, untrusted interfaces could send the User-ID agent's service account credentials outside the network. If you still use it, restrict it to trusted zones and plan its removal.
  • LDAP, RADIUS and TACACS+ bind secrets: stored in the firewall configuration and in its backups. The SonicWall SSL VPN account compromises showed why: after cloud configuration backups were exposed, the advice extended beyond user password resets to rotating these bind credentials, pre-shared keys and API keys. See the RADIUS Security Guide.
  • Mapping API keys: an XML or REST API key that can post mappings can make any IP look like any user. Scope it to the mapping function, restrict source addresses, and alert on mappings from unexpected senders.
  • Kerberos service principal and keytab: used for transparent portal authentication. Use a long random password or managed account, set an owner and rotate it.

Choosing an approach

SituationRecommended primary sourcePortal role
Corporate managed devices, mostly Windows, on premisesDirectory event monitoring or NAC session dataFallback for unmapped browsers only
Cloud first estate with an identity provider and Wi-Fi 802.1XNAC or RADIUS accounting with device certificatesSAML or OIDC portal for exceptions
Remote and hybrid workforceVPN or ZTNA client identityRarely needed
Shared terminal servers and VDITerminal server agent with port rangesNot suitable (one IP, many users)
Guest, contractor and BYOD networksPortal with sponsor approval or vouchersPrimary, ideally RFC 8908 aware
Small organisation, one firewall, few usersVPN identity plus portal on a guest SSIDPrimary for anything not on VPN

Large organisations should treat the firewall as a consumer of identity, not a source: feed it from NAC, the identity provider and VPN, redistribute mappings between firewalls (PAN-OS offers Redistribute User Mappings and Authentication Timestamps so all firewalls enforce timeouts consistently), and keep group mapping in one place. Small organisations gain most from putting MFA in front of remote access and admin interfaces and keeping guest traffic on its own segment. Where the goal is per application access for remote users, a ZTNA broker may be a better fit than user rules on a perimeter firewall; see the ZTNA Guide.

How to implement

  1. Inventory traffic and sources: list the zones where you want user rules, the identity sources that already see those users (domain controllers, NAC, VPN, proxies), and the devices that never log in.
  2. Create the service accounts properly: least privilege directory accounts, vaulted secrets, named owners, and a rotation date. Disable client probing unless there is no alternative.
  3. Enable passive mapping in monitor mode: turn on mapping and group sync, then compare mappings with DHCP and NAC records for two weeks to measure coverage and wrong user mappings before any rule depends on them.
  4. Build the portal: a dedicated hostname, a publicly trusted or enterprise trusted certificate, SSO through the identity provider where possible, and no HTTP Basic. Exempt infrastructure and non-browser devices.
  5. Add log only user rules: clone existing address rules with a user or group column and log hits, so you can see who would lose access.
  6. Pilot one zone: start with a single office or SSID, with the helpdesk briefed and a documented bypass rule that can be enabled in one change.
  7. Enforce and tighten: move to deny for unknown users in sensitive zones, add MFA authentication rules for admin targets, and shorten timeouts on shared segments.
  8. Roll back cleanly: keep the previous address based rule set disabled but present for the first change window; rollback is enabling it and disabling the identity rules, not rebuilding policy under pressure.

Detection and measurement

  • Authentication and mapping logs: PAN-OS writes an Authentication log entry for each request matching an Authentication rule and User-ID logs for mappings; equivalent logs exist on other platforms. Forward them to the SIEM alongside VPN and identity provider sign-in logs. The VPN and Firewall Log Detection Guide covers parsing.
  • Spraying against the portal: many failed portal logins across many usernames from one source match Password Spraying (T1110.003); bursts of successes from one address across many accounts suggest stolen Valid Accounts (T1078).
  • Mapping anomalies: one IP flipping between users within minutes, a privileged user mapped to a guest subnet, or mappings arriving from a sender that is not an approved agent.
  • Rogue portals: look for lookalike portal hostnames and certificates on guest networks, a common Adversary-in-the-Middle (T1557) setup for harvesting credentials.

Metrics that show it is working:

  • Mapping coverage: percentage of traffic in identity enforced zones with a known user (target above 95 percent).
  • Rules with a user or group condition as a share of rules in those zones.
  • Portal authentication failure rate and number of helpdesk tickets per week after go-live.
  • Median mapping age on shared and guest segments.
  • Number of firewall held service accounts with an owner and a rotation date inside policy.

Framework mapping

FrameworkReferenceRelevance
NIST SP 800-53 Rev. 5AC-3 Access Enforcement; IA-2, IA-2(1), IA-2(2); IA-8; IA-11 Re-authentication; AC-12 Session TerminationUser authentication and MFA before access, guest identification, re-authentication and timeouts
NIST SP 800-53 Rev. 5SC-7 Boundary Protection; AC-17 Remote Access; AU-2 Event Logging; SI-4 System MonitoringEnforcement point, remote access, mapping and authentication logs
NIST CSF 2.0PR.AA-01, PR.AA-03, PR.AA-05; DE.CM-01Identities managed and authenticated, access enforced, network monitored
CIS Controls v8.1Control 6 (6.4 MFA for remote network access); Controls 12 and 13Access control, network infrastructure and monitoring
ISO/IEC 27001:2022 Annex A5.15 Access control; 8.5 Secure authentication; 8.20 Networks security; 8.22 Segregation of networksPolicy, authentication and network controls
MITRE ATT&CKT1078 Valid Accounts; T1110.003 Password Spraying; T1557 Adversary-in-the-MiddleThreats the design and detections address

Common failure patterns

  • Stale mappings on Wi-Fi: a mapping timeout far longer than the DHCP lease lets the next device on that address inherit the previous user's access.
  • Service logons overwriting people: backup agents, monitoring tools or admins connecting from a jump host generate logon events that remap a workstation or server IP to a service account or a different user.
  • Portal on HTTP or a self-signed certificate: users learn to click through warnings, which is exactly what a rogue portal needs.
  • Over-privileged agent accounts: User-ID or FSSO style agents running as domain administrators, or client probing left on, turning the firewall integration into a credential exposure.
  • Bind secrets never rotated: LDAP and RADIUS credentials set at install time, copied into every configuration backup, and forgotten, as the SonicWall case illustrated.
  • Unknown users allowed by default: a catch-all rule permitting unmapped traffic quietly undoes every identity rule above it.

Practitioner checklist

  • Document every mapping source per zone and measure coverage before enforcing.
  • Disable client probing, or restrict it to trusted zones with a removal date.
  • Run all agent, bind and API accounts with least privilege, vaulted secrets, owners and rotation.
  • Serve the portal on a dedicated hostname with a trusted certificate, SSO and MFA; remove HTTP Basic.
  • Write an explicit rule for unknown users in every zone.
  • Align mapping timeouts with DHCP leases and shorten them on shared segments.
  • Put MFA authentication rules with short timeouts in front of admin and high value targets.
  • Forward authentication and mapping logs to the SIEM and alert on spraying and mapping anomalies.
  • Keep a tested rollback rule set for the first enforcement window.

Standards and references

Related NHI Mgmt Group resources: Firewall Management Guide · Network Access Control (NAC) Guide · RADIUS Security Guide · 802.1X and EAP-TLS Enterprise Wi-Fi Guide · ZTNA Guide

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 28 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org