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
| Log | Typical fields | Questions it answers |
|---|---|---|
| VPN authentication | User, group, source public IP, result, failure reason, authentication method (LDAP, RADIUS, SAML), client version and OS | Who tried to connect, from where, with which factor, and did it work |
| VPN session or tunnel | Assigned private IP, tunnel type (SSL VPN, IPsec), connect and disconnect time, duration, bytes in and out, host ID, device posture result | Which internal IP the user held and for how long; how much data moved |
| Firewall traffic | Source 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 IPS | Signature, severity, source, destination, action | Known exploit attempts and malware traffic |
| System and configuration | Admin login, configuration change, user or rule added, logging settings, firmware update, reboot | Who 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
| Behaviour | ATT&CK | Detection logic | Fidelity |
|---|---|---|---|
| Password spray against the VPN | T1110.003 | Failed logins for many distinct users from one IP or ASN within an hour; slow variant over 24 hours | Medium |
| Many accounts from one source | T1078, T1133 | Successful logins for more than a handful of distinct users from one public IP that is not a known office or carrier NAT | High |
| Dormant account use | T1078 | Successful login for an account with no VPN session in 60 or more days, or for a leaver | High |
| Single factor success | T1133 | Successful login where the authentication method shows no second factor, for any profile meant to require MFA | High |
| New source network or country | T1078 | User connecting from an ASN never seen for them, especially hosting providers and anonymising services | Medium |
| Concurrent sessions | T1078 | Same user with overlapping sessions from different public IPs | High |
| Unknown device | T1133 | Host ID, machine name or serial never seen for the user, or posture check failure followed by success | Medium |
| MFA fatigue at the VPN | T1621 | Repeated push timeouts or denials for one user, then success | High |
| Session after harvested credentials | T1556.004 | Burst of first-time logins for many users after an appliance vulnerability window; changes to login pages or authentication configuration | Medium |
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
| Behaviour | ATT&CK | Detection logic |
|---|---|---|
| Internal scanning from the VPN pool | T1046 | One VPN-assigned IP contacting many internal hosts or ports within minutes, with high deny or reset ratios |
| Lateral movement from VPN users | T1021.001 | VPN-assigned IPs connecting to RDP, SMB, WinRM or SSH on servers the user has never reached |
| Exploitation of a published service | T1190 | IPS signature hits on a public service followed by new outbound connections from that server |
| Outbound from servers that should not browse | T1071 | Allowed connections from server subnets to internet destinations outside the update and API allow list |
| Tunnelling and proxies | T1572, T1090 | Long-lived sessions on unusual ports, DNS volume anomalies, SSH or TLS to residential or hosting IPs from servers |
| Remote access tools | T1219 | Connections to remote support service domains from hosts that have no approved use |
| Bulk data out | T1048 | Bytes out per internal host per day far above its 30-day baseline, especially to new destinations |
| Rule or logging changes | T1686, T1599 | Rules 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
- Build a session table: from VPN session logs, record user, public IP, assigned private IP, host ID, start and end time.
- Enrich firewall flows: join firewall traffic on the assigned private IP within the session window, so every internal flow carries the VPN user.
- 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.
- 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.
- 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
- 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.
- 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.
- Enable high-fidelity rules first: many accounts from one source, dormant account success, single factor success, concurrent sessions and configuration changes.
- 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.
- Test: generate controlled failures and a test login from a new network with a test account; confirm alerts fire and carry the assigned IP.
- 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.
- 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
| Framework | Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.PS-04, DE.CM-01, DE.CM-03, DE.AE-03 | Log generation, network and personnel monitoring, correlation |
| NIST SP 800-53 Rev. 5 | AC-17, AC-2, AU-2, AU-6, AU-9, CM-3, SC-7, SI-4 | Remote access, account management, logging, log protection, change control, boundary protection, monitoring |
| CIS Controls v8.1 | 8.2, 8.9, 8.11, 13.6 | Collect, centralise and review logs; collect network traffic flow logs |
| ISO/IEC 27001:2022 | Annex A 8.15, 8.16, 8.20 | Logging, monitoring activities, network security |
| MITRE ATT&CK v20 | T1133, T1078, T1110.003, T1046, T1572, T1048, T1686 | Techniques visible in VPN and firewall logs |
| MITRE D3FEND | D3-CAA Connection Attempt Analysis, D3-ISVA Inbound Session Volume Analysis, D3-PHDURA Per Host Download-Upload Ratio Analysis, D3-NTA Network Traffic Analysis | Defensive 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
- ASD ACSC, CISA, FBI, NSA and partners: Best Practices for Event Logging and Threat Detection
- Palo Alto Networks: GlobalProtect Log Fields
- Fortinet: FortiOS Log Message Reference, 39426 LOG_ID_EVENT_SSL_VPN_USER_SSL_LOGIN_FAIL
- Cisco: ASA Syslog Messages 101001 to 199021
- CISA: Best Practices for Event Logging and Threat Detection
- MITRE ATT&CK: External Remote Services (T1133)
- MITRE ATT&CK: Logon Session Metadata (DC0088)
- CISA: Known Exploited Vulnerabilities Catalog
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