Join our Newsletter — 33% off our NHI Course
Home› Guides› VPN and Firewall Log Detection Guide: What to…
Guide SOC & Detection Engineering

VPN and Firewall Log Detection Guide: What to Collect and Which Detections Catch Intrusions

PDF for newsletter subscribers · free to read online

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

Remote access VPNs and perimeter firewalls are where a large share of intrusions begin, and their logs are often the only record of how an attacker got in. Valid but stolen VPN credentials, exploited gateway vulnerabilities and quiet outbound tunnels all leave traces in VPN authentication, session and firewall traffic logs, but those logs are frequently kept on the appliance, parsed badly or never baselined. This guide is for detection engineers, SOC analysts and network security owners. It covers what VPN and firewall logs contain, how to collect them so they survive an appliance compromise, detection logic for credential abuse, exploitation, scanning, lateral movement and exfiltration, and the metrics that show coverage is real. Hardening the appliance itself is covered in the VPN Security Guide; this guide is about the evidence.

Key takeaways

  • VPN authentication logs are identity logs. Treat every VPN login like a cloud sign-in: baseline user, source network, device and time, and alert on dormant accounts and many accounts from one source.
  • The appliance cannot be the only copy. Edge devices are a favoured target and their local logs and integrity tools can be subverted, so stream logs off the box in near real time.
  • Allowed traffic matters more than denied traffic. Deny logs show internet noise; allow logs from the VPN pool and from servers to the internet show what an intruder actually did.
  • Correlate across layers. VPN session, assigned internal IP, firewall flows and endpoint logons must join on user and IP, or the investigation stops at the gateway.
  • Configuration changes are detections. New local admins, rule changes, logging disabled and new VPN users on the device are high-value events in their own right.

What the logs contain

LogTypical fieldsQuestions it answers
VPN authenticationUser, group, source public IP, result, failure reason, authentication method (LDAP, RADIUS, SAML), client version and OSWho tried to connect, from where, with which factor, and did it work
VPN session or tunnelAssigned private IP, tunnel type (SSL VPN, IPsec), connect and disconnect time, duration, bytes in and out, host ID, device posture resultWhich internal IP the user held and for how long; how much data moved
Firewall trafficSource and destination IP and port, protocol, action (allow, deny, drop), rule name, NAT addresses, bytes, application and user (where identified)What the user or host connected to, and which rule allowed it
Firewall threat or IPSSignature, severity, source, destination, actionKnown exploit attempts and malware traffic
System and configurationAdmin login, configuration change, user or rule added, logging settings, firmware update, rebootWho changed the device and whether an attacker altered it

Palo Alto Networks documents the GlobalProtect log fields that a SIEM should parse, which make a useful checklist for any VPN: eventid, stage (for example before-login, login, tunnel), status, srcuser, public_ip, private_ip, machinename, hostid, serialnumber, client_os, client_ver, auth_method, login_duration, error and error_code, tunnel_type, portal and gateway. Fortinet's FortiOS log message reference documents event messages by ID, for example 39426, LOG_ID_EVENT_SSL_VPN_USER_SSL_LOGIN_FAIL, for failed SSL VPN logins. Cisco's ASA syslog message %ASA-4-106023 records packets denied by an access group, and Cisco notes that repeated messages from the same source may indicate scanning. Whatever the product, map vendor messages to a common schema (user, src_ip, assigned_ip, result, reason, bytes, duration) before writing rules.

In ATT&CK v20, VPN authentication logs feed the Logon Session Metadata data component (DC0088) and perimeter firewall logs feed Network Traffic Flow (DC0078); firewall configuration changes map to Firewall Rule Modification (DC0051).

Collection that survives an appliance compromise

The joint guidance Best Practices for Event Logging and Threat Detection, led by the Australian Signals Directorate's ACSC with CISA, the FBI, the NSA, the UK NCSC and other partners, lists internet-facing services, remote access and edge devices among the priority log sources for enterprise networks and VPN among the priority sources for enterprise mobility. Its recommendations translate directly to VPN and firewall logging:

  • Centralise and forward: aggregate logs centrally and forward them, which also prevents loss when local device storage fills.
  • Consistent time: synchronise time across devices and log in UTC using ISO 8601 with milliseconds, so VPN, firewall and endpoint events line up.
  • Protect in transit: the guidance recommends TLS 1.3 and cryptographic verification for log integrity; plain UDP syslog from an edge device can be dropped or spoofed.
  • Retain for discovery delays: the guidance notes incidents can take up to 18 months to discover; keep VPN authentication and session logs at least 12 months.
  • Restrict log access: only staff with a justified need should be able to modify or delete logs.

The Ivanti Connect Secure exploitation (CVE-2023-46805 and CVE-2024-21887, both in the CISA KEV catalogue) showed why. Attackers ran commands on the appliance, inserted a credential harvester into the login page and exposed stored service account credentials, and CISA found the vendor's Integrity Checker Tool failed to detect compromise. Off-box logs, network monitoring of the appliance's own traffic and external integrity checks were the evidence defenders could trust. See the Edge Device Compromise Investigation Playbook.

Detections for VPN authentication and sessions

BehaviourATT&CKDetection logicFidelity
Password spray against the VPNT1110.003Failed logins for many distinct users from one IP or ASN within an hour; slow variant over 24 hoursMedium
Many accounts from one sourceT1078, T1133Successful logins for more than a handful of distinct users from one public IP that is not a known office or carrier NATHigh
Dormant account useT1078Successful login for an account with no VPN session in 60 or more days, or for a leaverHigh
Single factor successT1133Successful login where the authentication method shows no second factor, for any profile meant to require MFAHigh
New source network or countryT1078User connecting from an ASN never seen for them, especially hosting providers and anonymising servicesMedium
Concurrent sessionsT1078Same user with overlapping sessions from different public IPsHigh
Unknown deviceT1133Host ID, machine name or serial never seen for the user, or posture check failure followed by successMedium
MFA fatigue at the VPNT1621Repeated push timeouts or denials for one user, then successHigh
Session after harvested credentialsT1556.004Burst of first-time logins for many users after an appliance vulnerability window; changes to login pages or authentication configurationMedium

The SonicWall SSL VPN account compromises of October 2025 are a textbook case for the "many accounts from one source" rule: more than 100 accounts across 16 environments logged in rapidly, mostly from a single IP, with some sessions disconnecting quickly and others scanning the network. The Colonial Pipeline attack is the case for the dormant account rule: a legacy VPN profile that was no longer used, never disabled and did not require MFA.

Detections for firewall traffic

BehaviourATT&CKDetection logic
Internal scanning from the VPN poolT1046One VPN-assigned IP contacting many internal hosts or ports within minutes, with high deny or reset ratios
Lateral movement from VPN usersT1021.001VPN-assigned IPs connecting to RDP, SMB, WinRM or SSH on servers the user has never reached
Exploitation of a published serviceT1190IPS signature hits on a public service followed by new outbound connections from that server
Outbound from servers that should not browseT1071Allowed connections from server subnets to internet destinations outside the update and API allow list
Tunnelling and proxiesT1572, T1090Long-lived sessions on unusual ports, DNS volume anomalies, SSH or TLS to residential or hosting IPs from servers
Remote access toolsT1219Connections to remote support service domains from hosts that have no approved use
Bulk data outT1048Bytes out per internal host per day far above its 30-day baseline, especially to new destinations
Rule or logging changesT1686, T1599Rules allowing any-any, new NAT to internal hosts, logging disabled on a rule, changes outside the change window

Deny logs from the internet to your perimeter are useful context for threat intelligence and for checking that a newly disclosed vulnerability is being targeted, but they make poor alerts. Spend detection effort on allowed traffic from the VPN pool and from servers. See the NetFlow and IPFIX Flow Telemetry Guide and the NDR Guide for richer network telemetry.

Correlating VPN, firewall and endpoint evidence

  1. Build a session table: from VPN session logs, record user, public IP, assigned private IP, host ID, start and end time.
  2. Enrich firewall flows: join firewall traffic on the assigned private IP within the session window, so every internal flow carries the VPN user.
  3. Join endpoint logons: link Windows logons (event 4624 with a network logon type) and Linux SSH logins from VPN-assigned IPs to the same user.
  4. Flag identity mismatches: a VPN user whose session produces logons as a different account, especially administrative or service accounts, is a strong lateral movement signal.
  5. Keep the DHCP-like mapping: VPN pools reuse addresses quickly; without the session table, an internal IP seen in an alert days later cannot be tied to a person.

See the Windows Event Log Guide for the endpoint side.

Where identity fits

VPNs and firewalls depend on machine credentials that rarely appear in identity programmes: LDAP or RADIUS bind accounts, SAML signing certificates, API keys for management, pre-shared keys for site-to-site tunnels and local administrator accounts. After any appliance compromise or configuration exposure, assume these are stolen. The NHI Mgmt Group analysis of the SonicWall compromises recommends rotating LDAP, RADIUS and TACACS+ bind credentials, API keys and pre-shared keys, because logs alone will not show whether they were taken. Detect their misuse elsewhere: the bind account authenticating from anything other than the appliance, or a management API key used from a new source. See the Edge Device Security Guide.

Rolling out detections

  1. Confirm the sources: every VPN gateway and firewall sends authentication, session, traffic and system logs off the device, with UTC timestamps and a parser that populates user, IPs, result and bytes.
  2. Baseline for 30 days: source ASNs and countries per user, normal session length, typical bytes, the set of internal services each VPN group reaches, and normal server egress destinations.
  3. Enable high-fidelity rules first: many accounts from one source, dormant account success, single factor success, concurrent sessions and configuration changes.
  4. Run behavioural rules in report mode: scanning from the VPN pool, server egress and data volume rules go to a hunting queue until false positives are understood.
  5. Test: generate controlled failures and a test login from a new network with a test account; confirm alerts fire and carry the assigned IP.
  6. Automate carefully: terminating a VPN session and disabling the account are safe automated responses for high-fidelity credential alerts; blocking IPs at the firewall automatically risks blocking carrier NAT ranges shared by many users.
  7. Roll back: version parsers and rules so that a vendor firmware update that changes log format can be handled by reverting or adjusting one parser, not by disabling rules.

Decision guidance

  • SIEM versus the vendor's analytics: vendor log managers parse their own logs well but cannot correlate with identity and endpoint data; send logs to both if the vendor tool is already used for troubleshooting.
  • Full traffic logging versus session-end only: logging at session end with bytes is usually enough for detection and far cheaper than start and end events; enable start events only for VPN pools and critical segments.
  • Small organisations: start with VPN authentication logs and five rules: dormant account, many accounts from one source, single factor success, concurrent sessions and admin configuration changes.
  • Large estates: normalise every vendor into one schema, include site-to-site tunnel state changes, and baseline per VPN group rather than per user to reduce noise.
  • Replace or monitor: where the VPN cannot enforce phishing-resistant MFA or produce usable logs, monitoring compensates only partly; consider the options in the Secure Remote Access Beyond VPN Guide.

Measuring whether it works

  • Source coverage: percentage of VPN gateways and firewalls streaming all four log types off-box (target 100).
  • Parse completeness: percentage of VPN events with user, public IP, assigned IP and result populated.
  • Attribution rate: percentage of internal flows from VPN pools that can be attributed to a named user.
  • Dormant account exposure: number of VPN-enabled accounts unused for 60 days (target falling to zero).
  • Time to detect: median minutes from a test login from a new network to alert.
  • Retention: months of VPN authentication and session logs searchable (target at least 12).

Common failure patterns

  • Logs only on the appliance: once the appliance is compromised, its logs and integrity checks cannot be trusted, and short local buffers overwrite the evidence.
  • No assigned IP in the SIEM: without the mapping from VPN user to private IP, firewall and endpoint alerts cannot be attributed and investigations stall.
  • Alerting on deny noise: perimeter deny volume floods the queue and hides the allowed connection that mattered.
  • Exempting service and legacy profiles: old VPN profiles and shared accounts are excluded from MFA and monitoring, which is exactly why attackers use them.
  • Not rotating appliance secrets: patching the gateway without rotating bind accounts, keys and certificates leaves attackers with valid credentials.
  • Ignoring configuration logs: new local users, rule changes and logging changes on the device go unreviewed.

Framework mapping

FrameworkReferenceRelevance
NIST CSF 2.0PR.PS-04, DE.CM-01, DE.CM-03, DE.AE-03Log generation, network and personnel monitoring, correlation
NIST SP 800-53 Rev. 5AC-17, AC-2, AU-2, AU-6, AU-9, CM-3, SC-7, SI-4Remote access, account management, logging, log protection, change control, boundary protection, monitoring
CIS Controls v8.18.2, 8.9, 8.11, 13.6Collect, centralise and review logs; collect network traffic flow logs
ISO/IEC 27001:2022Annex A 8.15, 8.16, 8.20Logging, monitoring activities, network security
MITRE ATT&CK v20T1133, T1078, T1110.003, T1046, T1572, T1048, T1686Techniques visible in VPN and firewall logs
MITRE D3FENDD3-CAA Connection Attempt Analysis, D3-ISVA Inbound Session Volume Analysis, D3-PHDURA Per Host Download-Upload Ratio Analysis, D3-NTA Network Traffic AnalysisDefensive analytics the rules implement

Practitioner checklist

  • Stream VPN authentication, session, firewall traffic and system logs off every device over an encrypted channel.
  • Log in UTC with millisecond timestamps and check time synchronisation on every appliance.
  • Parse user, public IP, assigned IP, result, reason, bytes and duration into one schema.
  • Keep a VPN session table so internal IPs can be attributed to users for at least 12 months.
  • Alert on many accounts from one source, dormant account success, single factor success and concurrent sessions.
  • Monitor VPN pools for internal scanning and first-time access to administrative protocols.
  • Alert on firewall rule, NAT, user and logging changes outside approved change windows.
  • Disable unused VPN profiles and accounts and review them monthly.
  • Rotate bind accounts, keys and certificates after any appliance compromise or configuration exposure.

Standards and references

Related NHI Mgmt Group resources: VPN Security Guide · Network Device Syslog and Configuration Change Detection Guide · Firewall Management Guide · Edge Device Exploitation by Threat Actors Guide · Entra ID Sign-In and Audit Log Detection Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

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 27 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

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.