Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Firewall Profiles

Direct answer

Windows Firewall has three profiles — Domain, Private and Public — chosen by Network Location Awareness for each network. Each has its own default actions and rules; Public should be strictest.

When to use this

Use this when the wrong firewall profile applies.

First 30 seconds

1. Get-NetConnectionProfile — which profile is active.

2. Domain/Private/Public each have their own rules.

3. Rule enabled in the active profile?

4. Fix the profile (NLA) rather than opening Public.

5. Verify.

Operational verification

network category → firewall profile → its rules

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 · Windows PowerShell
Key commandGet-NetFirewallProfile
Scope / prerequisiteUse this when the wrong firewall profile applies.
Verify · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Windows command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

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

2 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 Commands Verify boundary
Get-NetConnectionProfile
Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Private

Domain cannot be set manually; fix DNS or DC reachability instead.

Step 2 Common mistakes Narrow the fault
  • Servers stuck on Public because NLA could not reach a DC at boot — restart the NlaSvc or fix DNS.
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

How it works

Network Location Awareness (NLA, service NlaSvc) classifies each connection. If it can authenticate to a domain controller of the computer's domain, the connection becomes Domain; otherwise it gets the category the user or policy chose (Private or Public). The firewall profile follows that category, so the wrong category means the wrong set of rules.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

See which profile each adapter is in, and why

PS C:\> Get-NetConnectionProfile | Select InterfaceAlias, Name, NetworkCategory, IPv4Connectivity
InterfaceAlias  Name               NetworkCategory   IPv4Connectivity
--------------  ----               ---------------   ----------------
Ethernet        corp.example.com   DomainAuthenticated Internet
vEthernet (Lab) Unidentified network Public          LocalNetwork
PS C:\> Get-NetFirewallProfile | Select Name, Enabled, DefaultInboundAction, DefaultOutboundAction, LogFileName

DomainAuthenticated appears only when NLA could reach and authenticate to a DC of the computer's domain through that adapter. Each adapter is categorised separately: a server can be Domain on its LAN NIC and Public on a backup or virtual NIC.

Why a server ends up Public

CauseFix
NLA ran before the network/DNS was ready at bootRestart-Service NlaSvc -Force (also restarts dependants); fix DNS order
DC not reachable from that adapterExpected for isolated networks — set Private if appropriate
DNS suffix/servers wrong on the adapterCorrect DNS so _ldap._tcp.dc._msdcs resolves
Firewall rules exist only for Domain profileRules silently do not apply on the other profile

Rules are profile-specific

Get-NetFirewallRule -DisplayName 'Remote Desktop*' | Select DisplayName, Enabled, Profile
Set-NetFirewallRule -DisplayName 'Remote Desktop - User Mode (TCP-In)' -Profile Domain,Private

A rule enabled only for Domain stops working the moment NLA flips the adapter to Public — a classic cause of "RDP stopped after reboot".

Logging dropped packets per profile

Set-NetFirewallProfile -Name Domain,Private,Public -LogBlocked True -LogMaxSizeKilobytes 16384
Get-Content $env:SystemRoot\System32\LogFiles\Firewall\pfirewall.log -Tail 20

The log shows the profile-independent decision; combine it with the active profile to understand which rule set applied. In Group Policy, set the firewall per profile and avoid local rule merging on servers (AllowLocalFirewallRules = False) so the policy is the single source of truth.

*The Windows Firewall network profile records above are illustrative examples, not captured from a lab or production system.*

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Profiles

ProfileWhen
DomainNetwork where a DC is reachable (authenticated)
PrivateUser-marked trusted networks
PublicDefault for unknown networks

Check the active profile: Get-NetConnectionProfile.

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 → Firewall Profiles. 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?