Pcornel
Windows · Windows Firewall

Windows Defender Firewall

Cheat sheet · https://pcornel.dk/topic.php?topic=3099

Back to the Topic

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.

Remember

  • The firewall is stateful.
  • Rules apply per profile.
  • GPO or Intune manages it centrally.

First 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

Verify in this order

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

Where it usually breaks

First mismatch in host/interface identity → local config/routing/name state → Windows service/provider → firewall/security/session → remote service → application-visible exchange; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3099

Confirmation

Confirm action

Continue?