Flamingo Raises $4.5M Seed Round

Skip to content

A laptop that worked fine in the office stops answering RDP the day it joins a hotel network. A printer shares perfectly for one user and not at all for the next. Both tickets trace back to the same place, and this guide covers Windows Firewall end to end for IT teams: profiles, rules, logging and central management.

TL;DR

  • Windows Firewall is a host-based, stateful firewall that ships enabled in every Windows edition. By default it blocks unsolicited inbound traffic and allows outbound traffic.
  • It keeps three profiles: domain, private and public. Windows picks one per network connection, and the domain profile applies only when a domain-joined device can reach a domain controller.
  • Rules have no manual ordering. An explicit block beats an explicit allow, an allow beats the default block, and authenticated bypass is the one way around a block rule.
  • Logging is off until you turn it on. pfirewall.log caps at 4,096 KB by default, and the Security log's event 5157 records blocked connections once you enable auditing.
  • Manage it centrally with Group Policy or Intune. Decide whether local rules merge with yours, because that one setting explains a large share of "the rule is there but nothing works" tickets.

What Is Windows Firewall?

Windows Firewall, labeled Windows Defender Firewall in the console and "Firewall and network protection" in the Windows Security app, is the host-based firewall built into Windows. Microsoft's overview says it's "enabled by default on all Windows editions." It filters traffic entering and leaving the device by address, protocol, port, program, service and interface type.

The default behavior is short enough to memorize. It blocks all incoming traffic unless the traffic was solicited or matches a rule. It allows all outgoing traffic unless the traffic matches a rule. Everything else in this guide is a variation on those two lines.

"Solicited" is the key word. Windows Firewall tracks connections, so the reply to a web request your browser made comes back in without an inbound rule. That connection memory is what makes it a stateful firewall, the same model your perimeter device uses.

Under the hood, Windows Firewall is a set of filters in the Windows Filtering Platform (WFP), the kernel packet filtering framework. Third-party firewalls and security agents register filters in the same framework. That matters when you troubleshoot, because a block you see in WFP logs isn't always a Windows Firewall rule.

Two more facts save trouble later. Windows Firewall also carries IPsec connection security rules, which let you require authentication or encryption between devices. And Microsoft says plainly not to stop the service to turn the firewall off: the service is MpsSvc, and stopping it is unsupported and can break the Start menu and app installs. Turn off the profiles instead, and leave the service running.

The Three Profiles and How Windows Picks One

Windows Firewall holds three profiles, and every rule is scoped to one or more of them. The same app can be allowed on a private network and blocked on a public one.

Domain. Applied automatically when a device joined to Active Directory detects a domain controller on that connection. You can't set it manually. For Microsoft Entra joined devices, the NetworkListManager policy CSP can define what counts as the domain network.

Private. Meant for trusted networks such as a home or small office. An administrator can set it on a connection.

Public. Meant for hotels, airports and coffee shops, and the default for any network Windows can't identify. Microsoft designed it with higher security in mind.

Professor Messer's short walkthrough of the Windows Firewall settings is a good visual reference:

Network Location Awareness (NLA) is the Windows service that identifies each network and hands its category to the firewall. When a laptop moves from the office to home to a hotel, NLA re-evaluates, and the active profile changes with it. A device with two adapters can have two profiles active at once, one per connection.

To see what Windows decided, run Get-NetConnectionProfile and read the NetworkCategory field. To move a connection between private and public, use Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private. You can't switch a connection to DomainAuthenticated this way. If a domain-joined machine shows Public or Private on the office LAN, look at domain controller reachability and DNS before you touch the firewall.

This is the source of a classic ticket. A server boots before the network is ready, NLA can't reach a domain controller in time, and the connection lands on Public. Every rule scoped to Domain stops applying. Restarting the Network Location Awareness service or the adapter can bring the domain profile back, and fixing DNS or startup order stops it recurring.

Default Inbound and Outbound Behavior

Every profile has its own defaults: whether the firewall is on, the default inbound action, the default outbound action, whether users see notifications, and logging. Out of the box, all three profiles are on, inbound is blocked and outbound is allowed.

Microsoft's guidance is to keep it that way for typical deployments. Blocking outbound by default is an option for high-security environments, but it means you must inventory every app that needs the network and push an allow rule for each one. Microsoft is firmer on inbound: it should never change to allow all traffic by default.

The notification prompt deserves its own policy decision. When an app first listens for inbound connections and no rule exists, Windows can ask the user whether to allow it. If the user is an admin and clicks Cancel, Windows creates block rules, typically one for TCP and one for UDP. If the user isn't a local admin, Windows creates block rules whatever they click.

Those block rules persist. The prompt won't appear again until someone deletes them, so the app stays blocked long after the user forgot the dialog. On managed fleets, Microsoft recommends pushing allow rules before an app's first launch and turning inbound notifications off on every profile.

Rule Precedence: Block Beats Allow

Windows Firewall doesn't evaluate rules top to bottom, and you can't assign an order. Microsoft documents three fixed behaviors instead:

  1. Explicitly defined allow rules take precedence over the default block setting.
  2. Explicit block rules take precedence over any conflicting allow rules.
  3. More specific rules take precedence over less specific rules, except where an explicit block rule applies.

Rule 2 is the one that bites. A broad block rule, often created by a cancelled prompt or an old script, silently wins over the careful allow rule you just deployed. When an allow rule "doesn't work," search for a block rule that overlaps it before you edit anything.

The one exception is authenticated bypass. An inbound allow rule set to require IPsec authentication and to override block rules lets traffic from specified trusted computers or users through even when a block rule matches. In PowerShell it's -Authentication Required -OverrideBlockRules $true with a -RemoteMachine or -RemoteUser group. Microsoft positions it for scanning and management servers that need to reach devices without opening port exceptions for everyone.

Rule 3 matters for scoping. A rule that allows a single management host is more specific than one that allows a subnet, and both lose to a block rule covering the same traffic. Keep blocks rare and narrow, and do most of your control through the default block plus scoped allows.

Rule Types and What Each One Matches

The New Rule wizard in Windows Defender Firewall with Advanced Security (wf.msc) offers four types: program, port, predefined and custom. They all build the same kind of rule; the wizard only changes which conditions it asks for.

Program rules match an executable by full path. Microsoft's docs are explicit that wildcards such as C:\*\teams.exe aren't supported, which trips up apps that install into per-user or versioned folders. For those, App Control for Business AppID tags let a rule match a tagged group of processes instead of a path.

Port rules match TCP or UDP ports, optionally narrowed by remote address. Scope by address wherever you can. A rule that opens TCP 3389 to LocalSubnet or a management subnet is a very different risk from one that opens it to Any.

Predefined rules are the groups Windows already ships, such as Remote Desktop, File and Printer Sharing, Network Discovery and Windows Remote Management. Enabling the group turns on every rule inside it with the right ports and services, which is safer than recreating them by hand.

Custom rules combine any conditions: program plus port plus remote address plus interface type plus ICMP type. Rules can also use dynamic values such as the default gateway, DHCP servers, DNS servers and the local subnet, which keeps them portable across sites.

Separate from all four sit connection security rules. These don't allow or block anything on their own. They define IPsec authentication and encryption between devices, and firewall rules can then require that a connection is authenticated or encrypted before it's allowed.

netsh vs PowerShell NetSecurity Cmdlets

You can manage Windows Firewall from two command lines. netsh advfirewall is the older interface and still works. The NetSecurity PowerShell module (Get-NetFirewallRule, New-NetFirewallRule, Set-NetFirewallProfile and friends) is what Microsoft's current examples lead with, and it can do things netsh can't.

Tasknetsh advfirewallPowerShell NetSecurity
Turn all profiles onnetsh advfirewall set allprofiles state onSet-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
Allow a program from the local subnetnetsh advfirewall firewall add rule name="App" dir=in program="C:\App\app.exe" remoteip=localsubnet action=allowNew-NetFirewallRule -DisplayName "App" -Direction Inbound -Program "C:\App\app.exe" -RemoteAddress LocalSubnet -Action Allow
Enable a built-in rule groupnetsh advfirewall firewall set rule group="Remote Desktop" new enable=yesEnable-NetFirewallRule -DisplayGroup "Remote Desktop"
Find rules by portNot supported directlyGet-NetFirewallPortFilter | ? LocalPort -eq 3389 | Get-NetFirewallRule
Edit a GPO in one batchNot supportedOpen-NetGPO then -GPOSession, then Save-NetGPO
Manage a remote deviceRun it locally or in a remote session-CimSession RemoteDevice over WinRM
Put rules in a custom groupNot supported-Group "Line of business"

Two PowerShell quirks catch people. Get-NetFirewallRule doesn't show ports or addresses, because those live in separate filter objects; query them with Get-NetFirewallPortFilter and Get-NetFirewallAddressFilter, then pipe to the rule. And the default store is the persistent local store, so a rule that came from Group Policy won't appear until you query -PolicyStore ActiveStore, which shows the effective merged policy.

The -CimSession parameter runs over WinRM, and Microsoft's command-line guide notes that remote management through WinRM is enabled by default. If that's new ground, our guide to what WinRM is covers the setup and the security trade-offs.

For a wider reference, our list of PowerShell commands for IT teams sits alongside the firewall cmdlets.

When you need the same check across many machines, script it rather than clicking through wf.msc. OpenFrame can run a script such as Get-NetFirewallProfile | Select Name, Enabled, DefaultInboundAction across a client's devices and collect the output in one place.

Logging: pfirewall.log and WFP Events

Windows Firewall has two log sources, and they answer different questions.

The first is the firewall's own text log, %windir%\system32\logfiles\firewall\pfirewall.log. Microsoft's logging doc is direct about the default: "No logging occurs until you set" dropped packets or successful connections to Yes. The default size limit is 4,096 KB, after which old entries roll off, and the maximum is 32,767 KB.

Microsoft's own recommendations for that log are specific. Raise the size to at least 20,480 KB. Give each profile its own file (pfirewall_Domain.log, pfirewall_Private.log, pfirewall_Public.log) so you can tell which profile dropped what. Log both dropped packets and successful connections.

If the file never appears after you enable logging through policy, check the folder. The Windows Defender Firewall service (NT SERVICE\mpssvc) needs Full Control on the log folder, and a folder set by policy may not be created for you.

The second source is the Security event log, through WFP auditing. Event 5157, "The Windows Filtering Platform has blocked a connection," is logged per connection under the Audit Filtering Platform Connection subcategory. Event 5152, "The Windows Filtering Platform blocked a packet," is logged per packet under Audit Filtering Platform Packet Drop. Microsoft's auditing guidance calls packet-drop volume high and points you to 5157 instead for monitoring blocked connections.

Enable connection auditing on a single machine with auditpol /set /subcategory:"Filtering Platform Connection" /failure:enable, or through Advanced Audit Policy in a GPO. Event 5157 includes the process path and a filter run-time ID. Run netsh wfp show filters to write filters.xml, search it for that ID, and you'll see which filter, Windows Firewall or a third-party one, did the blocking.

For more than a handful of devices, forward these logs rather than reading them one machine at a time. Microsoft suggests Windows Event Forwarding or a SIEM connector, and our guide to log management covers collection and retention for small teams.

The opposite puzzle comes up too. An r/sysadmin admin whose firewall rules all come from Group Policy found a Nessus scan failing on a few servers, and working everywhere else with no rule that should allow it:

The firewall log couldn't say which rule allowed the traffic, and a reply pointed to the Windows Filtering Platform as the place to look. That's the workflow above: query the effective policy with -PolicyStore ActiveStore, check whether local merge brings in rules the GPO doesn't show, and use 5157 plus netsh wfp show filters to name the filter.

Central Management with Group Policy and Intune

Configuring the firewall device by device doesn't survive past a handful of machines. Pick one central source per device and manage everything there.

Group Policy. Domain-joined devices take firewall policy from Computer Configuration > Policies > Windows Settings > Security Settings > Windows Defender Firewall with Advanced Security. Set the profile defaults, logging and notifications on the properties page, then add inbound and outbound rules underneath. Link the GPO to the right OUs and filter by security group or WMI where server roles need different rules.

Danny Moran's walkthrough shows the GPO side step by step:

Intune. Endpoint security > Firewall offers separate profile types. The Windows Firewall profile sets state, defaults and logging. The Windows Firewall rules profile holds the rules themselves, and each instance supports up to 150 custom rules. Devices merge rules from several rules profiles, so you can split rules by app or role and exceed that limit.

Intune's conflict handling differs by profile type. If two Windows Firewall settings profiles set the same setting to different values, Intune doesn't send that setting to the device. Rules profiles behave differently: conflicting rules both reach the device, and there the usual precedence applies, so the block wins.

Now the setting that decides how much of this you control. Local policy merge, set per profile in both GPO (under "Rule merging" in the profile's Customize settings) and the Firewall CSP (AllowLocalPolicyMerge), controls whether rules created locally by admins and installers apply alongside yours. Microsoft notes that disabling it tightens control, and that "centralized deployment of rules is required for any app that needs inbound connectivity" once you do.

Disabling merge is a common reason a freshly installed app can't accept connections even though its installer "added a firewall rule." The rule exists in the local store and is ignored. One more detail from Microsoft's docs: Local Group Policy (gpedit.msc or secpol.msc) still applies even with merging disabled, because it's stored alongside centrally managed policy.

The Tickets Windows Firewall Generates

Four ticket types account for a steady share of firewall work. Each has a predefined rule group or a clear port, so the fix is usually enabling something that already exists, scoped properly.

RDP. Remote Desktop needs TCP 3389 inbound, and the predefined Remote Desktop group covers it. When RDP works on one network and not another, compare the active profile on each, since the rule may be enabled for only one of them. Enable the group on the domain profile through policy, and scope the remote address to your management subnet or VPN range.

File and printer sharing. SMB uses TCP 445, and discovery uses the Network Discovery group. Both are off on the public profile, which is why sharing "breaks" on any connection Windows mislabels as public. Check the profile before you add rules.

Ping. Windows 10 and 11 don't answer inbound ping out of the box, because the default inbound block covers ICMP echo and no enabled rule allows it. Monitoring tools then report a healthy machine as down. If your triage starts with "is it up," read our guide on destination host unreachable errors, then allow ICMPv4 echo on the domain profile only.

Apps. A line-of-business app that listens for inbound connections needs an inbound rule for its full executable path. Browsers are a separate case: they make outbound connections, which the default allows, so a "Windows Firewall is blocking Chrome" message usually points elsewhere. Our walkthrough on how to allow Chrome network access traces that one.

The ICMP point runs through a long r/sysadmin thread on whether to leave the firewall on at all. The consensus is on, with inbound blocked, and one reply captures the fallout of turning it on without planning: customers enable it, ping defaults to off, and a monitoring alert says the server is down.

Another reply in the thread lists what to open: WinRM, RDP and other management tools from privileged access workstations, plus ping on the domain network. That's a sensible starting allow list for any fleet.

A Hardening Baseline That Survives Audits

Don't write a firewall baseline from scratch. Microsoft publishes security baselines through the Security Compliance Toolkit as GPO backups, and Intune offers MDM security baselines built from the same guidance. CIS benchmarks for Windows 11 and Windows Server are the other common reference. Compare your policy against one of them and document any deviation.

Whichever you pick, check it against the core of Microsoft's own firewall guidance. The firewall is on for all three profiles. Inbound defaults to block. Outbound defaults to allow unless you're ready to maintain an outbound allow list. Inbound notifications are off on managed devices. Logging is on, per profile, with a larger file than the default.

Then make the decisions a baseline can't make for you. Decide per profile whether local rules merge. Disabling it on the public profile first, and on the domain profile once your app inventory is complete, is a gradual way in. Decide which management traffic is allowed and from where. Scope every inbound allow to the smallest remote address range that works.

Review the rules as well as the settings. Rules accumulate: installers add them, prompts add block rules, and old projects leave ports open. Microsoft recommends documenting each rule with the app, the ports and a creation date. A yearly review that deletes rules nobody can explain is worth more than another setting.

Test any baseline on a pilot group before you push it to the fleet. Firewall changes fail loudly: a blocked management port shows up as an outage.

Troubleshooting Checklist

Work top to bottom. Each step rules out one layer before you start editing rules.

StepCheckCommand or place
1Which profile is active on the connection?Get-NetConnectionProfile
2Is that profile on, and what are its defaults?Get-NetFirewallProfile -Profile Domain,Private,Public
3Does an allow rule exist in the effective policy?Get-NetFirewallRule -PolicyStore ActiveStore -Enabled True
4Is a block rule overlapping it?Get-NetFirewallRule -Action Block -Enabled True -PolicyStore ActiveStore
5Is local policy merge disabled, hiding a local rule?Get-NetFirewallProfile -PolicyStore ActiveStore | Select Name, AllowLocalFirewallRules
6Is the service listening on the port at all?Get-NetTCPConnection -State Listen -LocalPort 3389
7What does the firewall log say?pfirewall.log, after enabling dropped-packet logging
8Which filter blocked it?Event 5157, then netsh wfp show filters and search the filter ID
9Is a third-party firewall or security agent involved?Windows Security > Firewall and network protection shows which product is active
10Is the block upstream, not on the host?Test from the same subnet, then read the perimeter firewall's log

Step 6 is the quickest to rule out. If nothing is listening on the port, no firewall rule will fix it. Step 10 matters because a host firewall and a network firewall both drop traffic, and the symptom looks identical from the client.

If a connection works one way and not the other, remember the state model. Inbound replies to outbound traffic are allowed automatically, but a new inbound connection is not. That asymmetry is covered in our explainer on stateful vs stateless filtering.

The Short Version

Windows Firewall blocks unsolicited inbound traffic and allows outbound traffic, per profile, on every Windows device you manage. The usual culprits are the wrong profile, a block rule that outranks your allow, or local rules ignored because merge is off. Manage it from one place, Group Policy or Intune, turn logging on, start from a published baseline, and scope every inbound allow to the smallest range that works.

Aliaska Varieva

Aliaska Varieva

Head of Platform

Hi! I’m Aliaska, and I’ve been working as a software engineer (mostly Java + a bit Kotlin) for over 8 years now. I mostly spend my time building backend services, integrating systems, fixing bugs (the fun part 🙃), and making sure things don’t fall apart behind the scenes.

Related Content

Blog Posts

Product Releases

Podcasts

Webinars

Case Studies

Events

Onboarding Guides

Frequently Asked Questions

Windows Firewall

Windows Firewall, also called Windows Defender Firewall, is the host-based, stateful firewall built into every Windows edition and enabled by default. It filters traffic entering and leaving the device by address, protocol, port, program, service and interface type, and by default it blocks unsolicited inbound traffic and allows outbound traffic.
Domain, private and public. The domain profile applies automatically when a device joined to Active Directory can reach a domain controller. The private profile is for trusted networks and can be set by an administrator. The public profile is the default for any network Windows can't identify and is designed with higher security in mind.
Yes. Explicit block rules take precedence over any conflicting allow rules, and there is no way to reorder rules manually. The one exception is authenticated bypass: an inbound allow rule that requires IPsec authentication and is set to override block rules lets specified trusted computers or users through.
The default path is %windir%\system32\logfiles\firewall\pfirewall.log. Nothing is logged until you enable logging of dropped packets or successful connections. The default size limit is 4,096 KB and the maximum is 32,767 KB; Microsoft recommends at least 20,480 KB and a separate file per profile.
Both work, but the NetSecurity PowerShell cmdlets can do more. PowerShell can find rules by port or address, edit a Group Policy object in one session with Open-NetGPO and Save-NetGPO, put rules into custom groups, and manage remote devices with -CimSession over WinRM. Microsoft documents the first three as unsupported in netsh.
Check four things in order: which profile is active on the connection, whether an explicit block rule overlaps your allow rule, whether local policy merge is disabled so locally created rules are ignored, and whether the service is listening on the port at all. Query the effective policy with Get-NetFirewallRule -PolicyStore ActiveStore rather than the local store.

About OpenFrame

OpenFrame isn't built to plug into your stack. It replaces it. Instead of duct-taping a dozen tools together (RMM, MDM, SIEM, patching, remote access, each its own login and bill), we bundle it into one unified platform: RMM, MDM, monitoring, automation, remote access, patch management, security monitoring, and ticketing, plus built-in AI copilots. So "does it integrate with X?" usually means: you won't need X anymore.
Most platforms give you one piece and expect you to bolt the rest on. OpenFrame unifies the whole stack in one place, with AI copilots built in. Fewer logins, fewer bills, less duct tape.
In the cloud, on US soil. Your data stays stateside.

MSP AI Agents

Yes. In production MSP shops today, 10% to 25% of tickets close before a human opens them. Thread alone has processed 173 million tickets across 750-plus MSP partners at 96% triage accuracy, handing back 490,000-plus technician hours. Agents own the low-risk, high-volume work (password resets, MFA enrollment, known installs, onboarding and offboarding) and flag anything that touches production data or needs judgment for a human to take.