Interactive Investigation Map

Article type: Tutorial

Scenario: Security policy should identify users and groups instead of relying only on IP addresses in a Windows domain environment.

Click to reveal the investigation path
  1. Step 1: Understand the topology
  2. Step 2: Configure the relevant Palo Alto objects
  3. Step 3: Verify policy/routing/NAT behavior
  4. Step 4: Test the expected traffic flow
  5. Step 5: Review logs and counters
  6. Step 6: Record production considerations

Visual generated specifically for this article.

Traditional firewall policies rely heavily on IP addresses to define access control rules. In modern enterprise networks with dynamic DHCP allocation, remote workers, and shared infrastructure, IP addresses no longer provide reliable identity context. Relying solely on IP addresses creates complex rulebases that require frequent updates and lack user-level visibility.

Palo Alto Networks User-ID solves this issue by binding IP addresses to corporate user accounts and Active Directory (AD) groups. By integrating your firewall with Active Directory, you can write security policies based on group membership rather than volatile IP subnets. This guide provides a complete, step-by-step Palo Alto User-ID configuration tutorial using an integrated agentless Active Directory setup.

Real-Life Scenario

An enterprise organization, CorpLab, wants to transition from IP-based security policies to role-based access control across its corporate network. The engineering and finance departments reside on the same LAN subnet (10.0.200.0/24) via DHCP.

The business requirements specify:

  • Members of the Active Directory group grp-finance must access financial application servers while being blocked from engineering repositories.
  • Members of grp-engineering must access code repositories and testing subnets while being blocked from financial servers.
  • Security analysts must see specific domain usernames in firewall traffic logs instead of anonymous IP addresses.

To achieve this, the firewall must read login events from Windows Domain Controllers to build an IP-to-user mapping table and query LDAP to resolve group memberships.

Lab Topology

The following ASCII topology illustrates the network architecture used in this guide. All IP addresses, hostnames, and domain names represent lab configuration values and must be adapted to match your production environment.

+-----------------------------------------------------------------------+
|                         Active Directory DC                           |
|                         Hostname: DC01                                |
|                         Domain: corp.lab                              |
|                         IP: 10.0.100.10/24                            |
+-----------------------------------------------------------------------+
                                   |
                                   | (LDAP / WinRM)
                                   |
+----------------------------------+------------------------------------+
|                                                                       |
|                     Palo Alto Networks Firewall                       |
|                     Management IP: 192.168.1.254                      |
|                                                                       |
|  [ Interface: ethernet1/1 ]             [ Interface: ethernet1/2 ]    |
|  Zone: Trust                            Zone: Untrust                 |
|  IP: 10.0.200.1/24                      IP: 203.0.113.1/24            |
+----------------------------------+------------------------------------+
                                   |
                                   |
                         +---------+---------+
                         |  Local Switch     |
                         +---------+---------+
                                   |
                +------------------+------------------+
                |                                     |
+---------------+---------------+     +---------------+---------------+
|  Finance Client Workstation   |     |  Engineering Workstation      |
|  IP: 10.0.200.15/24           |     |  IP: 10.0.200.20/24           |
|  User: corp\jdoe              |     |  User: corp\asmith            |
|  Member: grp-finance          |     |  Member: grp-engineering      |
+-------------------------------+     +-------------------------------+

Example Addressing and Objects

The following parameters are used throughout the configuration steps in this tutorial:

Object / Parameter LAB Value Description
Active Directory Domain corp.lab Windows Active Directory Domain FQDN
NetBIOS Domain Name CORP Short domain name used in legacy authentication
Domain Controller (DC01) 10.0.100.10 Primary AD Domain Controller running LDAP and WinRM
User-ID Service Account svc-pan-userid Dedicated AD account for log reading and LDAP queries
Base DN DC=corp,DC=lab Root directory search path for LDAP queries
Trust Zone Subnet 10.0.200.0/24 Internal client workstation segment
Target AD Groups grp-finance, grp-engineering Active Directory security groups mapped to security policy

Prerequisites

Before starting the firewall configuration, verify that the following infrastructure requirements are met:

  • Dedicated AD Service Account: Create a domain service account (for example, svc-pan-userid) with a strong password set to never expire.
  • Service Account Permissions:
    • For LDAP querying: Standard Domain Users membership is sufficient.
    • For Agentless Server Monitoring: Add the service account to the Distributed COM Users and Event Log Readers built-in groups on the Domain Controller. If using WinRM, add the user to the Remote Management Users group.
  • Network Connectivity and Ports: Ensure the firewall management port or dedicated service route can reach the Domain Controller on the required ports:
    • LDAP: TCP 389 (or TCP 636 for LDAPS)
    • WinRM (HTTP): TCP 5985 or WinRM (HTTPS): TCP 5986
    • WMI/RPC (Legacy alternative): TCP 135 and dynamic RPC range
  • DNS Resolution: Configure valid operational DNS servers under Device > Setup > Services on the firewall so it can resolve the FQDN of the Domain Controllers.

Step-by-Step GUI Configuration

Step 1: Create an LDAP Server Profile

An LDAP Server Profile enables the firewall to query Active Directory for group memberships and user attributes. Without LDAP, the firewall can map IP addresses to usernames, but it cannot map usernames to AD groups.

  1. Log into the PAN-OS web interface.
  2. Navigate to Device > Server Profiles > LDAP.
  3. Click Add at the bottom of the screen.
  4. In the Profile Name field, enter LDAP-Corp-DC Profile.
  5. Click Add under the Servers list and enter:
    • Name: DC01
    • LDAP Server: 10.0.100.10
    • Port: 389 (or 636 if using LDAP over SSL)
  6. Configure the connection details:
    • Type: active-directory
    • Base DN: DC=corp,DC=lab
    • Bind DN: corp\svc-pan-userid
    • Password: Enter the service account password.
  7. Click OK to save the server profile.

Step 2: Configure Group Mapping Settings

Group Mapping defines which Active Directory groups are pulled into the firewall’s local database for use in security rules.

  1. Navigate to Device > User Identification > Group Mapping Settings.
  2. Click Add.
  3. In the Name field, enter AD-Group-Mapping.
  4. Under the Server Profile dropdown, select LDAP-Corp-DC Profile.
  5. In the User Domain field, enter corp.lab.
  6. Click the Group Include List tab.
  7. Expand the directory tree in the left pane and select the required groups:
    • cn=grp-finance,ou=groups,dc=corp,dc=lab
    • cn=grp-engineering,ou=groups,dc=corp,dc=lab
  8. Click the + icon to move the selected groups to the right-hand column. Selecting specific groups prevents exhausting firewall memory limits on large Active Directory installations.
  9. Click OK.

Step 3: Configure Agentless User-ID Server Monitoring

Integrated Agentless User-ID configures the firewall to monitor Windows Event Logs directly on Domain Controllers via WinRM or WMI. When a user logs into a domain-joined workstation, the DC generates a login event (e.g., Event ID 4624). The firewall reads this event and binds the user to the IP address reported in the log.

  1. Navigate to Device > User Identification > User Mapping.
  2. Click the gear icon in the top-right corner of Palo Alto Networks Integrated Agent Settings.
  3. Select the Server Monitoring tab.
  4. Set Default Domain Name to corp.lab.
  5. Under WinRM Protocol Settings, check Enable WinRM if using WinRM (recommended over legacy WMI for performance and firewall predictability). Set the port to 5985 (HTTP) or 5986 (HTTPS).
  6. Enter the service account credentials under Client Credentials:
    • Domain: corp
    • User Name: svc-pan-userid
    • Password: Enter the account password.
  7. Click OK.
  8. Under the Server Monitoring section on the main User Mapping page, click Add:
    • Name: DC01-Monitor
    • Type: Domain Controller
    • Network Address: 10.0.100.10
  9. Click OK.

Step 4: Enable User-ID on Security Zones

User-ID must be explicitly enabled on incoming traffic zones. If User-ID is disabled on a zone, the firewall drops identity enforcement for traffic originating from that zone, regardless of background mappings.

  1. Navigate to Network > Zones.
  2. Click your internal client zone (e.g., Trust).
  3. Check the Enable User-ID checkbox.
  4. Click OK.

Step 5: Reference AD Groups in Security Policy

With User-ID fully configured, you can apply groups directly to security policies.

  1. Navigate to Policies > Security.
  2. Click Add to create a new rule.
  3. Under the General tab, name the rule Allow-Finance-Services.
  4. Under the Source tab:
    • Source Zone: Trust
    • Source Address: any (or specify client subnets)
    • Source User: Click Add, select corp.lab\grp-finance from the list.
  5. Under the Destination tab, configure the target network/zone (e.g., Financial Application Servers in DMZ).
  6. Under Actions, set Action to Allow.
  7. Click OK, then click Commit in the top right to apply changes.

CLI Section

The PAN-OS command-line interface provides real-time state verification and operation metrics for User-ID components.

To verify that the firewall is parsing active login events from Domain Controllers and populating its IP-to-User mapping table, run:

show user ip-user-mapping all

To view mappings for a specific IP address:

show user ip-user-mapping ip 10.0.200.15

To inspect current connection status with Domain Controllers monitored by agentless User-ID:

show user server-monitor state all

To confirm that LDAP group memberships are synchronized and resolved correctly:

show user group name "cn=grp-finance,ou=groups,dc=corp,dc=lab"

To list all AD groups synchronized into local storage:

show user group list

If group memberships were updated in Active Directory and require an immediate update on the firewall, refresh the group mapping cache:

debug user-id refresh group-mapping all

CAUTION: Clearing or force-refreshing global user mappings during production hours may transiently impact active policy enforcement. Use targeted CLI commands or test during maintenance windows.

To clear the IP-to-user mapping table (forces re-discovery):

clear user ip-user-mapping all

How the Traffic Flows

Understanding how Palo Alto Networks firewalls evaluate user identities during packet processing helps when building rules and troubleshooting.

  1. Authentication Event: A user logs into a Windows client machine (10.0.200.15) authenticating against Domain Controller DC01. DC01 logs a successful logon event in its Windows Security Event log.
  2. Event Fetching: The firewall reads this logon event via WinRM. It parses the username (corp\jdoe) and matching IP address (10.0.200.15).
  3. Mapping Table Update: The User-ID process updates its internal IP-to-User mapping table.
  4. Group Resolution: In the background, the firewall matches corp\jdoe against its local LDAP group database, determining that corp\jdoe belongs to cn=grp-finance,ou=groups,dc=corp,dc=lab.
  5. Packet Evaluation (SYN): The client sends an initial TCP SYN packet through the firewall toward a server.
  6. Zone & IP-to-User Lookup: The firewall receives the frame on an interface in the Trust zone. Because Enable User-ID is active on Trust, the dataplane queries the User-ID process using the source IP address (10.0.200.15).
  7. Policy Matching: The firewall finds the user corp\jdoe and group grp-finance. It evaluates the Security Policy top-to-bottom. It matches Allow-Finance-Services because the source zone, user group, destination address, and port criteria align.
  8. Session Creation: The firewall creates a stateful session, records the identity in session details, and forwards the packet.

Verification

Follow these steps to confirm your setup works properly:

1. Confirm IP-to-User Mapping

Log in as a test user on a workstation. Open the firewall CLI and check if the user identity maps correctly:

admin@PA-FW> show user ip-user-mapping ip 10.0.200.15

IP              Vsys   From    User                             IdleTimeout(s) MaxTimeout(s)
--------------- ------ ------- -------------------------------- -------------- -------------
10.0.200.15     vsys1  UIA     corp\jdoe                        2582           2582         

2. Confirm DC Connection State

Verify that the firewall maintains an active monitoring session with your Domain Controller:

admin@PA-FW> show user server-monitor state all

Active Directory Domain Controller : DC01
        Host: 10.0.100.10
        Status: Connected
        Type: WinRM

3. Verify Group Resolution

Check that the firewall resolves the user account to the intended AD group:

admin@PA-FW> show user group name "cn=grp-finance,ou=groups,dc=corp,dc=lab"

Group Name: cn=grp-finance,ou=groups,dc=corp,dc=lab
Source Profile: AD-Group-Mapping
Members:
    corp\jdoe

4. Verify Security Policy Log Details

Generate traffic from the client workstation to a permitted resource. Navigate to Monitor > Logs > Traffic in the GUI. Confirm that the Source User column correctly shows corp\jdoe for the session.

Troubleshooting

When User-ID fails, systematically isolate the issue using these symptoms and checks:

Symptom 1: Source User is Listed as “Unknown” in Traffic Logs

  • Check Zone Configuration: Go to Network > Zones and ensure Enable User-ID is checked for the source zone.
  • Check IP Mapping Table: Run show user ip-user-mapping all. If the IP is missing, verify that the user generated an authentication event on the DC (Logoff/logon cycle on client).
  • Check Server Monitor State: Run show user server-monitor state all. If status shows Disconnected or Error, check service account credentials and network firewall rules blocking TCP 5985/5986 or 135/445.

Symptom 2: User Identified, but Security Policy Rules Matching AD Groups Fail

  • Domain Format Mismatch: Group mapping requires consistent domain formatting. If group mapping uses corp.lab\jdoe while server monitoring produces CORP\jdoe, the firewall cannot link the mapping to the group. Align the domain string in Group Mapping Settings and User Mapping.
  • LDAP Group Selection: Verify that the group is listed under the Group Include List in Device > User Identification > Group Mapping Settings. Unselected groups are ignored by PAN-OS.
  • Verify Group Cache: Query the group membership via CLI using show user group name <group_dn> to ensure LDAP mapping succeeded.

Symptom 3: Intermittent Missing Mappings on DHCP Networks

  • Timeout Tuning: If IP addresses change quickly, stale IP-to-User mappings can send traffic under the wrong security profile. Check the IP mapping timeout settings under Device > User Identification > User Mapping > Client Mapping. Adjust User Identification Timeout to match your local DHCP lease duration.

Common Mistakes

  • Forgetting to Enable User-ID on Zones: Configuring profiles without enabling User-ID on the ingress security zone prevents identity discovery.
  • Importing Entire Active Directory Trees: Adding root organizational units to the Group Include List pulls unnecessary groups, exceeding object limits and causing high management plane CPU usage. Only select necessary operational groups.
  • Service Account Lockouts: Using service accounts subject to password expiration policies causes connection drops to Domain Controllers when passwords change.
  • Using Legacy WMI Instead of WinRM: WMI relies on dynamic RPC port allocation, making local DC host firewalls difficult to manage and causing unnecessary performance overhead. WinRM over port TCP 5985/5986 provides reliable monitoring.
  • Ignoring NetBIOS vs. FQDN Domain Names: Misconfiguring the short NetBIOS domain name (e.g., CORP) vs the DNS FQDN domain name (e.g., corp.lab) leads to group-matching failures.

Production Considerations

  • Architecture Scaling: For environments with more than 10 Domain Controllers or high login frequencies (>100 logons/sec), switch from integrated agentless monitoring to dedicated Windows User-ID Agents installed on standard domain member servers. This offloads Event Log parsing overhead from the firewall management plane.
  • Redundancy: Always define multiple Domain Controllers within LDAP Server Profiles and User Mapping Server Monitoring to preserve high availability during DC maintenance.
  • GlobalProtect and Terminal Services: Agentless DC monitoring cannot differentiate individual users behind shared IP environments like Citrix or Terminal Servers. Deploy the Palo Alto Networks Terminal Services (TS) Agent on multi-user servers for accurate user tracking.
  • Security Considerations: Encrypt LDAP traffic by selecting TCP 636 (LDAPS) or enabling StartTLS in the LDAP Server Profile. Secure WinRM communication using HTTPS (port 5986) or strong service account privileges.

Summary

Implementing a proper Palo Alto User-ID configuration converts identity data into enforceable network security policy. By integrating Active Directory via LDAP and agentless server monitoring, Palo Alto Networks firewalls replace static IP rules with identity-aware policies.

To keep your implementation running smoothly, select explicit groups in your inclusion lists, ensure Domain Controller connectivity over modern transport protocols like WinRM, and verify that incoming security zones are enabled for identity lookup.