Amazon holiday deals See deals →ad

Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

Windows Firewall Log Location and How to Read It

The Windows Defender Firewall log is usually at %systemroot%\system32\LogFiles\Firewall\pfirewall.log, which on a typical Windows installation means C:\Windows\System32\LogFiles\Firewall\pfirewall.log. The file is created only when firewall logging is enabled for the relevant network profile; if it is missing, check the logging settings before assuming Windows has no firewall activity.

Where the log is stored

The standard path is under the Windows directory, in System32\LogFiles\Firewall. The active text log is generally named pfirewall.log. If Windows is installed on a drive other than C:, substitute that drive and installation path, or enter the environment-variable path above in File Explorer’s address bar.

The log is a plain-text file, so Notepad or another text editor can open it. Access to the folder or file may be restricted by permissions. If you cannot open it, try an administrator account rather than changing file permissions broadly; the firewall service and its settings should remain managed by Windows.

Do not confuse this file with the firewall’s configuration, Windows Security’s protection history, or the Windows event logs. Those contain different kinds of information. The firewall text log records selected traffic and connection events according to its logging options; it is not a complete record of everything that happened on the computer.

Why the log may not exist

Windows Firewall can be active while its file-based logging is off. Logging is configurable separately for each network profile—Domain, Private, and Public—so a setting enabled for one profile may not apply to the profile currently in use. Windows can also rotate or overwrite the log when it reaches its configured size, so an older entry may no longer be present.

To enable or check logging in the graphical interface, open Windows Defender Firewall with Advanced Security:

  1. Search the Start menu for Windows Defender Firewall with Advanced Security and open it.
  2. Select Windows Defender Firewall with Advanced Security in the left pane, then choose Properties in the right pane.
  3. Review the Domain, Private, and Public Profile tabs. On the profile you want to inspect, select Customize in the Logging section.
  4. Set the log path if needed, and choose whether to log dropped packets and successful connections. Confirm the maximum file size and apply the changes.

Administrative rights may be required to change these options. If the device is managed by an organization, policy may control the settings, and a local change may be unavailable or later reverted. On Windows editions or interfaces where the labels differ, the same options can be managed through Windows Firewall with Advanced Security or through administrative policy tools.

What the firewall log records

The log is useful for troubleshooting, but it records only the categories you enable. Dropped packets are traffic the firewall blocked; successful connections are traffic allowed through the firewall. Enabling both can produce a larger file and more detail, while logging only drops can help focus on blocked traffic.

Entries typically include a date and time, an action such as DROP or ALLOW, the protocol, source and destination addresses and ports, and other packet details. The header at the top of the file identifies the fields and their order. For example, a DROP entry can show that a packet from a particular address to a local port was blocked. It does not, by itself, prove that an attack occurred: routine network discovery, unused services, or misconfigured applications can also generate blocked traffic.

Times in the log are recorded in UTC, so they may not match the clock shown in the Windows taskbar. Convert the timestamp to the computer’s local time zone before comparing an entry with an app alert or another log.

How to find and read entries

Press Windows key + R, enter %systemroot%\system32\LogFiles\Firewall\pfirewall.log, and press Enter. If the file opens in a text editor, use its search function to look for an IP address, port, or action. You can also open the containing folder in File Explorer and sort by modification time to identify the latest log.

  • Start with the header row so you know what each column means.
  • Check the action and timestamp, then compare the source and destination addresses and ports with the application or connection you are troubleshooting.
  • Look for repeated, relevant entries rather than treating one isolated drop as proof of a security problem.
  • Use a copy of the log for analysis if you need to preserve the original evidence or share it with support.

For example, if an application cannot receive connections on a particular port, enable dropped-packet logging for the network profile in use, reproduce the issue, and search for the port in the new entries. A matching drop is a useful clue, but also check the app’s own configuration, the active profile, and any router or third-party security rules. The Windows firewall log will not show a connection blocked by a router before it reaches the computer.

Log size, rotation, and privacy

The Logging settings let you set a maximum size for the file. When it reaches that limit, Windows manages the log according to its configured logging behavior; older data may be overwritten or the log may be reset. If you need to investigate an issue, copy the current file soon after reproducing it. Avoid setting an unnecessarily large limit or logging every successful connection indefinitely, since busy systems can generate substantial data.

Entries can contain IP addresses, ports, and timestamps that reveal details about network activity. Treat the file as operational data: share it only with people who need it, and consider removing unrelated entries before sending a copy. Do not delete or edit the active log as a first troubleshooting step; changing logging settings and preserving a copy makes it easier to understand what occurred.

Common problems and misconceptions

If the expected file is absent, first verify that logging is enabled on the profile actually in use and confirm the configured path. Also check whether the selected options include the kind of traffic you expect to see. A log configured to record dropped packets will not list every allowed connection.

Another common misconception is that every firewall decision appears in pfirewall.log. The file is not an all-purpose audit trail, and its contents depend on the logging options, profile, and retention limit. For broader system troubleshooting, Windows Event Viewer may provide related firewall or networking events, but it is a separate source and does not simply duplicate the text log. Third-party security products may also use their own logs and paths.

Frequently Asked Questions

Where is the Windows Firewall log in Windows 10 or 11?
By default, look at %systemroot%\system32\LogFiles\Firewall\pfirewall.log, typically C:\Windows\System32\LogFiles\Firewall\pfirewall.log. The configured path can be changed in the firewall profile’s Logging settings.

Why can’t I find pfirewall.log?
File logging may be disabled, or the log may be configured to use a different path. Check the Domain, Private, and Public profile settings in Windows Defender Firewall with Advanced Security.

How do I turn on Windows Firewall logging?
Open Windows Defender Firewall with Advanced Security, open its Properties, choose the relevant profile, and select Customize under Logging. Enable logging for dropped packets, successful connections, or both, as appropriate.

Does the firewall log show blocked connections?
Yes, if logging for dropped packets is enabled for the active profile. An entry marked DROP indicates blocked traffic, but it does not by itself establish that the traffic was malicious.

Can I open pfirewall.log in Notepad?
Yes. It is a plain-text log. Its header describes the columns, and timestamps are in UTC, so account for the time-zone difference when matching events.

Windows Firewall Log Location and How to Read It
Scroll to top