VPN audit logs that name the resource
VPN audit logging records who signed in, which device they used, what they reached, and who changed the configuration. This guide explains what to log, how long to keep it, how to export it, and what a traditional VPN log does not show.
Clients and Gateways report
Each connection to the control plane makes a session entry. The two ends of a tunnel each report its flows.
Admin work leaves a record
A portal sign-in, a configuration change, and each request with an API token each make an entry.
Four streams, 90 days
Change Logs, Session Logs, API Request Logs, and Flow Logs stay in the admin portal for 90 days.
A log sink feeds the SIEM
A log sink pushes the entries to your SIEM, where you set your own retention and alerts.
What VPN audit logging must record
An audit log is a record of events that you can use as evidence later. For remote access, a complete record answers six questions.
- Who signed in. The user or the service account, and the identity provider that authenticated them.
- From where. The source IP address, and the country and city that it maps to.
- With which device. A device identifier, the operating system, and the version of the client.
- What they reached. The service, the protocol, the port, the start and end time, and the volume of data.
- Who changed the configuration. The admin, the object, and the state before and after the change.
- What each API token did. The token, the request, and the time.
Most VPN logs answer the first two questions well. The last four are where the gaps are.
Why the logs matter
Incident response
During incident response, the first question is always about scope. You need to know which systems a stolen account or a lost laptop reached, and when. Without a record for each resource, the honest answer is "all systems that the VPN could route to".
Access reviews
A review shows if a person who left the company still connects, and if a sign-in came from an unusual location. It also shows which access rules nobody uses, so that you can remove them.
Compliance
Security frameworks such as SOC 2 and ISO 27001 expect an organization to monitor access to its systems and to track changes. An auditor usually asks for evidence. Read the framework and ask your auditor for the exact controls that apply to you.
Change tracking
Many outages and many breaches start with a configuration change. A record of each change, with the person and the earlier state, makes the cause quick to find and to undo.
What a traditional VPN log lacks
A traditional VPN concentrator logs the tunnel. A typical entry says that a user connected from a public address, got an internal address from a pool, and disconnected some hours later.
That entry does not say which resource the user reached. The VPN logs do not hold that fact, because the VPN gives the user a route to a network and then steps aside.
To find the answer, an analyst must join more than one data source:
- Find the internal address that the VPN assigned to the user at that time.
- Search firewall logs or network flow logs for that address.
- Map each destination address back to a service, if the address still belongs to the same service.
Address pools make this work fragile. The same internal address belongs to a different user some hours later. If the clocks or the retention periods of the sources differ, the join fails.
Configuration changes are a second gap. Many appliances record that an admin signed in, but not what the admin changed.
Log retention and export to a SIEM
Log retention
Log retention is the time that you keep each entry. A short period saves money, but an intruder can stay in a network for months before someone notices. Set the period from your own legal, contract, and security needs.
The retention in the VPN product and the retention that you need are frequently different. If you need more time, export the logs and keep them in your own system.
Export to a SIEM
A SIEM collects logs from many systems so that you can search and alert across all of them. Export also protects the evidence. An attacker who controls the VPN admin account cannot delete the copy in the SIEM.
When you plan the export, check these points:
- Format. Structured JSON is easier to parse than free text syslog lines.
- Delivery. Find out if the product can skip or repeat an entry after an outage, and how you remove duplicates.
- Order. For configuration changes, the order of entries matters as much as the content.
- Location. The exported copy has its own storage region and retention. Check both.
Good practice for VPN audit logs
- Log by identity, not by address. An entry must name the user and the device, because an address changes owner.
- Log each resource. Make sure that a record names the service that the user reached, not only the tunnel.
- Log the admins too. Record each configuration change and each API request with the same care as user traffic.
- Keep secrets out. A log must not become a second store of tokens and credentials.
- Test a real question. Select one user and one day. Try to list all the systems that the user reached. The time that this takes is your true incident response speed.
How Firezone does audit logging
Firezone writes four audit log streams on all plans. Each stream answers one question.
- Session Logs. Who connected, from where, and with which device. Each Client, Gateway, and admin portal session makes one entry with the source IP address and its location.
- Flow Logs. Which traffic went between Clients and Resources. Each flow names the actor, the Policy, the Resource, the protocol, the addresses and ports, the times, and the bytes.
- Change Logs. Who changed the configuration. Each entry holds the state before and after the change, and Firezone redacts secrets.
- API Request Logs. What each API token did. Firezone writes the entry before it processes the request.
The flow logs are the part that a tunnel log lacks. The control plane supplies the actor, the Policy, and the Resource of each flow, so a device cannot attribute its traffic to a different user. The Client and the Gateway each report the same flow, and you can compare the two reports.
Firezone keeps the entries of all four streams for 90 days. You can read them in the admin portal or through the REST API.
For a longer period, a log sink pushes the entries to Amazon S3, Datadog, Elastic, IBM QRadar, Microsoft Sentinel, New Relic, Splunk, or a generic HTTP endpoint. Delivery is in order and at least one time for each entry. Log sinks are on the Business and Enterprise plans.
Two limits apply. Flow Logs do not record DNS queries. Flow Logs are off by default for a Policy that targets the Internet Resource.
Audit logging in a legacy VPN, a mesh VPN, and Firezone
The three approaches record different things, because they control access at different levels.
| Legacy VPN | Mesh VPN | Firezone | |
|---|---|---|---|
| Sign-in records with user and source address | Yes | Yes | YesSession Logs |
| A record names the resource and the rule that allowed it | NoShows a tunnel and a pool address | PartialFlow records by device address | YesEach flow names the Policy and the Resource |
| Configuration changes with before and after | PartialDepends on the appliance | Partial | YesChange Logs |
| A record of each API request | Partial | Partial | YesAPI Request Logs |
| Export to a SIEM | YesUsually syslog | PartialOn some plans | PartialLog sinks on the Business plan and up |
| Retention in the product | Depends on the appliance storage | Depends on the plan | 90 days on all plans |
The table describes the usual design of each category. A specific product can be different. Read the documentation of the product before you decide.
Common questions
What must a VPN audit log contain?
At a minimum, it must contain the user, the device, the source address, the time, and the resource that the user reached. It must also contain each configuration change and each action of an API token.
How long must I keep VPN logs?
No one period is correct for all organizations. Your contracts, your regulator, and your security team set the period. Firezone keeps audit logs for 90 days. If you need more time, export the logs to your own storage or SIEM.
Do VPN logs show which websites or servers a user visited?
A traditional VPN log usually shows only the tunnel session. You need firewall logs or flow logs to see each destination. Firezone Flow Logs record each flow to a Resource, with the address and the port. They do not record DNS queries.
Does SOC 2 or ISO 27001 require VPN audit logs?
The two frameworks expect you to monitor access and to track changes, and remote access is usually in scope. The frameworks do not name a product or a log format. Ask your auditor which evidence they accept.
Can I send Firezone audit logs to my SIEM?
Yes, on the Business and Enterprise plans. A log sink pushes the entries in batches, about one time each minute. Each entry has a unique log_id that you can use to remove duplicates.