InfoSec.run
• 4 min read •

How to Integrate RADIUS (NPS) Identities with the Palo Alto User-ID Agent

Also available in: Read in Español

This is a very common use case: We have a Wi-Fi network where access is controlled through authentication against Active Directory.

Usually, this integration is implemented by deploying a RADIUS server such as Windows Network Policy Server (NPS).

The problem: We want to enforce traffic control on a Palo Alto NGFW by user identity, but the devices connecting to the Wi-Fi network are not domain-joined or are mobile devices. Therefore, the User-ID agent has no visibility into these users.

The solution: It is possible to send the information of RADIUS-authenticated users to the User-ID agent, whether it is the firewall-integrated agent or the Windows agent.

How: The Palo Alto User-ID agent has the ability to receive login information via Syslog; we just need to find a way to export the NPS logs in the right format and forward them via Syslog to the agent.

Step 1: Configure Windows NPS logs

  1. Open the NPS console.

  2. In the navigation menu, click Policies > Accounting.

  3. In the Log File Properties section, click Change Log File Properties.

  4. In the dialog box, click the Settings tab.

  5. In the Log the following information section, enable the following options:

    • Accounting requests
    • Authentication requests
    • Periodic accounting status
    • Periodic authentication status.
  6. In the Logging failure action section, enable the option If logging fails, discard connection requests.

  7. Click the Log File tab.

  8. In the directory field, choose the location where the NPS logs will be stored. I suggest using a new directory exclusively for NPS logs since the default location contains logs from other services.

  9. In the Format drop-down, choose DTS Compliant. This is an XML format that will be easier to use later.

  10. In the Create a new log file section, choose Daily.

  11. Enable the option When disk is full delete older log files.

  12. Click OK.

  13. Verify that logs are generated in the chosen directory after users authenticate via RADIUS.

Step 2: Install NXLog to monitor NPS logs and forward them via Syslog

  1. Download the latest version of NXLog; the Community Edition is free: https://nxlog.co/products/nxlog-community-edition/download.
  2. Install NXLog on the NPS server.
  3. Go to C:\Program Files (x86)\nxlog\conf and replace nxlog.conf with the following content:

Remember to replace the path where NPS logs are stored in Input in_NPS and the destination Syslog IP and port in Output User-ID.

Step 3: Configure the User-ID Agent (Windows) to receive Syslog

  1. Open the agent configuration as administrator.

  2. Go to Setup > Edit.

  3. Select the Syslog tab and enable Enable Syslog Service.

  4. Add the login and logout event profiles by clicking Add.

  5. Enter a profile name and choose the Regex type.

  6. In Event Regex, enter a text string that appears exclusively in login events. In my case, I chose Acct-Authentic.

  7. In Username Regex, enter the regex that extracts the username from the event. In my case, the user appears in the “User-Name”: field, matched with the regex:

    "User-Name":"([a-zA-Z0-9/]+)"

  8. In Address Regex, enter the regex that extracts the IP address from the event. In my case, the IP appears in the “Framed-IP-Address”: field, matched with the regex:

    "Framed-IP-Address":"([^"]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})

  9. Click OK to save the profile.

  10. Create a new profile or clone the Login one and change the name. This will be used to identify logout events.

  11. In Event Regex, enter a text string that appears exclusively in logout events.

  12. The username and address fields should remain the same unless logout events arrive in a different tag.

  13. Now go to Discovery > Add.

  14. Enter a name to identify the sender.

  15. Enter the IP of the NPS server.

  16. In Server Type, choose Syslog Sender.

  17. In Default Domain Name, enter the AD domain.

  18. In Filters, add the two profiles we just created and specify which one is for login and which one is for logout.

  19. Click OK to save.

  20. At the top, click Save and then Commit to save the changes.

  21. Verify under Monitoring that users who sign in via RADIUS appear, and then confirm that the information is visible on the firewalls integrated with the agent.

Conclusions

This article presents a specific configuration for integrating RADIUS with User-ID, but with minimal changes it is possible to build similar integrations with non-NPS RADIUS servers or integrate directly with the User-ID agent on the NGFW.

How to Integrate RADIUS (NPS) Identities with the Palo Alto User-ID Agent
Author Jaime Moscoso
Published Apr 27, 2023

Comments