Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Windows Defender Firewall

Direct answer

Windows Defender Firewall is the stateful host firewall in Windows. Manage it with wf.msc, Get-NetFirewallProfile and New-NetFirewallRule, or centrally through Group Policy or Intune.

First 30 seconds

1. Service running: Get-Service mpssvc.

2. Profiles enabled.

3. GPO-managed rules: Get-NetFirewallRule -PolicyStore ActiveStore.

4. Logging: Set-NetFirewallProfile -LogBlocked True.

5. Review rules.

Operational verification

WFP-based firewall → rules from local and GPO stores → enforcement

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Windows networking and network services
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformWindows networking and network services
Scope / prerequisiteUse this when managing Windows Defender Firewall.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Disabling the firewall to fix connectivity instead of adding a rule.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • The firewall is stateful.
  • Rules apply per profile.
  • GPO or Intune manages it centrally.
Key checks
  • Get-NetFirewallProfile — profiles, enabled, default actions, logging
  • Get-NetFirewallRule -Enabled True -Direction Inbound — enabled inbound rules
  • Get-NetFirewallRule -DisplayName '<name>' | Get-NetFirewallPortFilter — ports of a rule
  • netsh advfirewall monitor show firewall — effective state
ReferenceWhy it matters1 section · depth on demand

Rule processing

Rules are not processed top-down like a router ACL. Windows evaluates: authenticated bypass rules, then block rules, then allow rules, then the profile default. An explicit block therefore wins over any allow rule. Rules from all sources (local, GPO, MDM) are combined into the effective policy, shown in wf.msc → Monitoring.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Windows Defender Firewall is a stateful host firewall with three profiles (Domain, Private, Public) and rules for inbound, outbound and connection security (IPsec).

Get-NetFirewallProfile | ft Name,Enabled,DefaultInboundAction,DefaultOutboundAction,LogFileName,LogAllowed,LogBlocked
Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled True -DefaultInboundAction Block
Set-NetFirewallProfile -All -LogBlocked True -LogMaxSizeKilobytes 16384

Manage rules centrally with GPO or Intune; local rule merging can be disabled ("Apply local firewall rules: No") so only centrally managed rules apply.

Logging

Set-NetFirewallProfile -Profile Domain -LogBlocked True -LogFileName %SystemRoot%\System32\LogFiles\Firewall\pfirewall.log

Documented example, not captured output. Blocked connections also appear in the Security log (event 5157) when WFP auditing is enabled.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docWindows networking and network services current

Authoritative/upstream documentation reviewed for bounded claims in Windows Firewall → Windows Defender Firewall. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/ · confidence 94%
Confirmation

Confirm action

Continue?