HomeNewsletterCommunityMVP FeedToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog
Windows 11 Windows 11Windows Defender FirewallFirewallGroup PolicyIntuneFirewall CSPPowerShellEvent ViewerRegistryWFP

Your firewall rule is deployed and the traffic is still blocked: profile scoping, rule merge, and the local rules you did not know were being ignored

IA
Imran Awan
21 August 2026

You deploy a firewall rule. It arrives. You can see it in the console. The traffic is still blocked. Nothing in the rule looks wrong, no error appears anywhere obvious, and the application owner is asking why IT broke their app.

This is one of the most common false-negative troubleshooting traps in Windows. The rule you are looking at is the intended configuration. What decides whether a packet lives or dies is the effective configuration, and Windows builds that from three network profiles, several separate rule stores, and a per-profile switch that decides whether local rules count at all. This post walks through each of those pieces, then shows you how to read the effective set instead of the intended set.

The short version

Windows Defender Firewall evaluates only the rules that belong to the profile currently in force, and Windows picks that profile itself from the network category of each connected adapter. Rules also live in several stores at once: a local store, Group Policy, an MDM store, and service-hardening stores, all merged into an ActiveStore. Two settings, AllowLocalPolicyMerge and AllowLocalIPsecPolicyMerge, decide whether the local store is honoured at all, and when they are off, every rule an application installer created for itself is silently ignored while still appearing enabled in the console. Read the merged result with Get-NetFirewallProfile -PolicyStore ActiveStore and Get-NetFirewallRule -PolicyStore ActiveStore -TracePolicyStore, never from the rule list you deployed.

The problem: the rule exists and the traffic does not

Start with the shape of the failure, because it is always the same shape. Someone needs inbound traffic to reach an application. You write an allow rule, deploy it from Microsoft Intune or Group Policy, and confirm it landed on the device. The application still cannot be reached.

There are only a handful of reasons this happens, and none of them produces an error message.

What Windows Defender Firewall actually is. It is a host-based firewall built into every Windows edition and enabled by default, filtering traffic on criteria such as source and destination IP address, IP protocol, and source and destination port number. Microsoft states the default behaviour plainly: block all incoming traffic, unless solicited or matching a rule, and allow all outgoing traffic, unless matching a rule. So on inbound, no rule means no traffic. That is why a missing or ignored allow rule looks exactly like a block.

The reason this is hard to debug is that every management surface shows you a different slice of the truth. The Windows Defender Firewall with Advanced Security console shows you the rules in the store you are pointed at. netsh shows you the local store by default. Intune shows you what you asked for. Only one view shows you what the packet will meet, and this post ends with that view.

Why it happens: three profiles, several stores, one merge switch

Profiles: Windows chooses, not you

A profile is a named set of firewall settings and rules that applies to a class of network. Windows Defender Firewall has exactly three, and Microsoft documents how each one is selected.

Selection is driven by Network Location Awareness (NLA), the Windows component that classifies the network an adapter is attached to. On Microsoft Entra joined devices, where there is no domain controller to detect, the NetworkListManager Policy CSP lets you nominate endpoints that mark a network as the domain network.

The second half of the rule matters more for laptops. Microsoft documents that when a device is connected to multiple networks, the most restrictive profile is applied to all network adapters, with public considered most restrictive, then private, then domain. One tethered phone can therefore move an entire domain-joined machine onto the Public profile, and every Domain-only rule stops being evaluated.

Gotcha: the profile bitmask in the CSP is not obvious. In the Firewall CSP, a rule's Profiles node is a bitmask: 0x1 is Domain, 0x2 is Private, 0x4 is Public, and 0x7FFFFFFF means all profiles. Deploy a rule with 0x1 because someone typed "domain" into a ticket and you have built a rule that will never fire on a remote worker's device. In the Intune UI the same choice is the Network type field, and leaving it unselected applies the rule to all network types.

Stores: your rule is one voice in a choir

Windows keeps firewall rules in several places, and the enforced set is the sum of them. The -PolicyStore parameter on the NetSecurity cmdlets is the cleanest way to see the model, because Microsoft documents each store by name.

Policy storeContainsWritable
PersistentStoreLocal, sometimes called static, rules created manually or by an application installer. Not from Group Policy. Attached to the ActiveStore and active immediately.Yes
ActiveStoreThe currently active policy: the sum of all stores that apply, that is the resultant set of policy plus the local stores. This is the one that matters.No
RSOPThe sum of all Group Policy Objects applied to the computer.No
SystemDefaultsThe default state of the firewall rules that ship with Windows.No
StaticServiceStoreThe service restrictions that ship with Windows, known as Windows Service Hardening.No
ConfigurableServiceStoreService restrictions added for non-Microsoft services, plus network isolation rules for app containers.Yes

Rules deployed by an MDM such as Intune arrive through the Firewall CSP into the MDM store, and are observed in the ActiveStore with a source type of MDM, a value that does not appear in Microsoft's documented list for that field, so read it as helpful rather than guaranteed. Group Policy rules appear with the documented source type GroupPolicy. Local rules appear as Local. That single field is what turns "I deployed a rule" into "the device is enforcing my rule".

One more documented behaviour bites people who copy rules between stores. Microsoft notes that a rule Name acts like a filename: during Group Policy processing and policy merge, rules that have the same name but come from multiple stores overwrite one another so that only one exists. A GPO with higher precedence therefore silently replaces the local version of a rule with the same name.

The merge switch: the setting that makes local rules vanish

Now the heart of it. Rule merging policy settings control how rules from different policy sources can be combined, and they are configured per profile. Microsoft's own wording for the firewall half is unambiguous.

AllowLocalPolicyMerge, from the Firewall CSP: "This value is used as an on/off switch. If this value is false, firewall rules from the local store are ignored and not enforced. The merge law for this option is to always use the value of the GroupPolicyRSoPStore." The default is true. AllowLocalIPsecPolicyMerge does the same job for connection security rules: "If this value is false, connection security rules from the local store are ignored and not enforced, regardless of the schema version and connection security rule version."

Read that carefully. The local rules are not deleted, disabled, or flagged. They are ignored. The console still lists them, still shows a green tick, and the traffic they were written for still dies. This is the single most misdiagnosed firewall condition in managed estates, because the evidence you are looking at is telling you the opposite of the truth.

Microsoft is equally clear about the consequence: "If merging of local policies is disabled, centralized deployment of rules is required for any app that needs inbound connectivity." Turning merge off is a legitimate and often correct hardening choice. It is also a commitment to owning every inbound rule your estate will ever need.

Gotcha: local Group Policy still wins. Microsoft documents an exception that surprises almost everyone. "Local Group Policy firewall rules and settings are applied even when rule merging is disabled through MDM or Group Policy." Rules configured locally through secpol.msc or gpedit.msc are stored in the same location as centrally managed Group Policy, so they survive the merge switch. Only a local administrator can use those tools, but on a device where someone has admin rights, "merge is off" does not mean "no local configuration".

There is a second trap in the Intune wording. In the Windows firewall profile, the setting is presented as Ignore all local firewall rules and its partner as Ignore connection security rules. Setting Ignore to Yes means merge is off. The polarity is inverted relative to the CSP node it drives, so a reviewer skim-reading a policy export can easily conclude the opposite of what the device will do.

Precedence: block beats allow, with one documented exception

Microsoft publishes the precedence rules for both inbound and outbound, and they are short.

  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. Microsoft's example: if rule 1 covers an IP address range and rule 2 covers a single IP host address, rule 2 takes precedence.

Outbound rules follow the same behaviours. Critically, Microsoft states that "Windows Firewall doesn't support weighted, administrator-assigned rule ordering". There is no rule number to bump. If a block rule overlaps your allow rule, the only fix is to change one of the two rules.

The documented exception is authenticated bypass. A firewall rule created with -OverrideBlockRules $true and an authentication requirement allows traffic from a specified trusted device or user to override firewall block rules. Microsoft's stated use case is scanning servers that must reach managed devices without opening ports. It is the only sanctioned way to beat a block rule, and it requires IPsec authentication to work.

The engine underneath: what calls what

It helps to know which component is doing the ignoring. The chain, from policy to packet, runs like this.

  1. Policy arrives, from Group Policy, the Firewall CSP, or a local write, and lands in a registry store.
  2. MpsSvc, the service whose display name is Windows Defender Firewall, reads those stores, applies the merge laws, and produces the effective rule set. Its code is C:\Windows\System32\mpssvc.dll, hosted in a svchost.exe process.
  3. MpsSvc hands filters to the Base Filtering Engine. Microsoft describes BFE as "a user-mode service (bfe.dll running in a svchost.exe process) that coordinates the WFP components", whose principal tasks are adding and removing filters, storing filter configuration, and enforcing configuration security.
  4. The Windows Filtering Platform filter engine does the work, with a user-mode component that performs RPC and IPsec filtering and a kernel-mode component that filters at the network and transport layers of the TCP/IP stack.
  5. Callout drivers plug into the kernel-mode layers. The firewall's own authorization driver is C:\Windows\System32\drivers\mpsdrv.sys.
BinaryLocationRole in the flow
mpssvc.dllSystem32The MpsSvc service DLL. Reads the stores, merges policy, publishes filters.
bfe.dllSystem32The Base Filtering Engine service. Coordinates WFP and stores filter configuration.
mpsdrv.sysSystem32\driversWindows Defender Firewall Authorization Driver. MpsSvc declares a dependency on it.
wfplwfs.sysSystem32\driversObserved on a live device as the WFP lightweight filter bound to adapters, with component IDs ms_wfplwf_upper and ms_wfplwf_lower. Check it with Get-NetAdapterBinding -AllBindings.
FirewallAPI.dllSystem32The management API and the source of the localised rule names such as @FirewallAPI.dll,-25351.

Do not fix a firewall problem by stopping the service. Microsoft says explicitly that stopping the Windows Firewall service is not supported and can cause the Start menu to stop working, modern applications to fail to install or update, activation by phone to fail, and other incompatibilities. The supported way to turn the firewall off is to disable the profiles and leave the service running. On a live device you can confirm the dependency chain in the registry: MpsSvc declares DependOnService of mpsdrv, bfe, nsi, so stopping the Base Filtering Engine takes the firewall service down with it.

How to verify: reading the effective rule set

Everything above is background. This section is the actual technique: stop reading the policy you wrote, and read what the device merged.

Step 1: which profile is actually in force

The two cmdlets below answer that. The first reports the network category of each connected interface, which is what NLA decided. The second reports the firewall's own per-profile state as merged into the ActiveStore.

PowerShell - run elevated
Get-NetConnectionProfile | Select-Object InterfaceAlias, NetworkCategory, IPv4Connectivity # NetworkCategory is the decision NLA made. Public, Private or DomainAuthenticated. InterfaceAlias NetworkCategory IPv4Connectivity -------------- --------------- ---------------- Wi-Fi Public Internet # Healthy for a home worker. But every Domain-only rule on this device is now inert, # because Microsoft applies the most restrictive profile: Public, then Private, then Domain. Get-NetFirewallProfile -PolicyStore ActiveStore | Select-Object Name, Enabled, DefaultInboundAction, AllowLocalFirewallRules, AllowLocalIPsecRules # ActiveStore = the merged result. This is the line that ends most arguments. Name Enabled DefaultInboundAction AllowLocalFirewallRules AllowLocalIPsecRules ---- ------- -------------------- ----------------------- -------------------- Domain True Block False False Private True Block False False Public True Block False False # Broken-looking but deliberate: AllowLocalFirewallRules False on all three profiles # means every rule in the local store is ignored. Healthy default is True.

Read the output top to bottom. If NetworkCategory is Public and your rule is Domain-scoped, you have your answer and you can stop. If AllowLocalFirewallRules is False and your rule was created locally, likewise.

Step 2: where did each rule come from

The -TracePolicyStore switch asks Windows to record, for each rule in the ActiveStore, which store it came from. Grouping on that field gives you the policy-versus-local split in one line.

PowerShell - run elevated
Get-NetFirewallRule -PolicyStore ActiveStore -TracePolicyStore | Group-Object PolicyStoreSourceType | Select-Object Name, Count # PolicyStoreSourceType is documented: Local, GroupPolicy, Dynamic, Generated, Hardcoded. # MDM appears on Intune-managed devices. Name Count ---- ----- Local 639 MDM 19 Dynamic 3 # 19 MDM rules landed. Good. 639 local rules are present but, with merge off, unused. Get-NetFirewallRule -DisplayName 'Contoso LOB inbound' -PolicyStore ActiveStore | Select-Object DisplayName, Enabled, Direction, Action, Profile, PolicyStoreSourceType # If this returns nothing, the rule is not in force, whatever the portal says. Get-NetFirewallRule -DisplayName 'Contoso LOB inbound' -PolicyStore ActiveStore | Get-NetFirewallPortFilter | Select-Object Protocol, LocalPort, RemotePort # Ports, addresses and programs live in separate filter objects, one per rule. # Use Get-NetFirewallAddressFilter and Get-NetFirewallApplicationFilter the same way.

Microsoft explains why that last pair of commands is needed: when you run a Get cmdlet for a rule, common conditions such as addresses and ports do not appear, because they are represented in separate objects called filters, in a one-to-one relationship with the rule. If you never pull the filter, you never see the port your rule actually opened.

Gotcha: netsh reads a different store. On a device where merge is switched off by MDM, netsh advfirewall show currentprofile reports LocalFirewallRules N/A (GPO-store only) and shows logging as disabled, while Get-NetFirewallProfile -PolicyStore ActiveStore on the same device reports AllowLocalFirewallRules False and logging enabled. Neither tool is lying. netsh is showing the local store, PowerShell was asked for the merged one. This is observed behaviour on a Windows 11 build 26200 device, so treat netsh output as a local-store view and confirm anything important against the ActiveStore.

Step 3: the registry, one store at a time

Each store is a registry location, and reading them side by side shows you which one is imposing the setting. Group Policy writes under the policies hive; the local and MDM stores live under the SharedAccess service key.

HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy
Subkey or value under that parentStoreWhat it holds
FirewallRulesLocalOne registry value per local rule, the rule expressed as a versioned string such as v2.33|Action=Allow|Active=TRUE|Dir=In|Protocol=41|App=System|...
DomainProfile, StandardProfile, PublicProfileLocalPer-profile local settings: EnableFirewall, DisableNotifications, and a Logging subkey. Note that the private profile is called StandardProfile here.
Mdm\FirewallRules and Mdm\<Profile>MDMRules and per-profile settings written by the Firewall CSP, including AllowLocalPolicyMerge and AllowLocalIPsecPolicyMerge as REG_DWORD.
RestrictedServices\AppIso\FirewallRulesConfigurable serviceNetwork isolation rules created for app containers. Microsoft documents that these are not accessible with Get-NetFirewallRule.

The Group Policy store is a different hive, and its profile subkey names differ from the local store's. Microsoft's protocol documentation for the merge values is precise about this.

HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall
ValueValid subkeysType and data
AllowLocalPolicyMergeDomainProfile, PrivateProfile, PublicProfile. Microsoft states it MUST NOT be present on StandardProfile.REG_DWORD, 0x00000000 or 0x00000001
AllowLocalIPsecPolicyMergeSame three, same exclusion of StandardProfile.REG_DWORD, 0x00000000 or 0x00000001
FirewallRules (subkey)Directly under the parent key.One value per GPO-delivered rule, same string grammar as the local store

That naming split is worth internalising. The private profile is StandardProfile in the local store and PrivateProfile in the Group Policy store. A detection script that assumes one name for both stores will report a clean device that is actually misconfigured.

Registry Editor
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\Mdm\PublicProfile
AllowLocalPolicyMerge      REG_DWORD   0x00000000 (0)
AllowLocalIPsecPolicyMerge  REG_DWORD   0x00000000 (0)
DefaultInboundAction       REG_DWORD   0x00000001 (1)
DefaultOutboundAction      REG_DWORD   0x00000000 (0)
EnableFirewall             REG_DWORD   0x00000001 (1)
Illustrative rendering of a genuine read from a Windows 11 device. A zero on the first two values is the whole bug.

Step 4: Event Viewer, on two different logs

The firewall writes operational events to its own channel, and the filtering platform writes enforcement events to the Security log. They are separate, and you need both.

Applications and Services Logs > Microsoft > Windows > Windows Firewall With Advanced Security > Firewall

Microsoft does not publish a per-ID reference for that channel. The IDs below were observed on a live Windows 11 Enterprise build 26200 device, with their literal message text. Treat them as useful signposts, not as a contract: an undocumented event ID can change in any update, so do not build compliance detection on them.

Observed IDMessage text on the deviceWhy it matters here
2010Network profile changed on an interfaceThe moment the active profile flipped. Includes old and new profile per adapter.
2008Windows Defender Firewall Group Policy settings have changed. The new settings have been appliedPolicy arrival. Absence of this after a GPO change means the change never landed.
2083A Windows Defender Firewall setting has changedA per-profile setting changed, including the merge switches.
2097 / 2099 / 2052A rule has been added to / modified in / deleted in the Windows Defender Firewall exception listThe rule lifecycle. Each entry names the Rule ID and Rule Name.
2059All rules have been deleted from the Windows Defender Firewall configuration on this computerA store was replaced wholesale, naming the modifying application.
2011Windows Defender Firewall was unable to notify the user that it blocked an application from accepting incoming connectionsSomething was blocked and the user never found out.

The Security log is the documented half, and it is where enforcement is proved. Two audit subcategories matter, and neither is on by default.

Event IDDocumented titleSubcategory required
4957 (F)Windows Firewall did not apply the following ruleMPSSVC Rule-Level Policy Change
4958 (F)Windows Firewall did not apply the following rule because the rule referred to items not configured on this computerMPSSVC Rule-Level Policy Change
4956 (S)Windows Firewall has changed the active profileMPSSVC Rule-Level Policy Change
4954 (S)Windows Firewall Group Policy settings have changed. The new settings have been appliedMPSSVC Rule-Level Policy Change
5157 (F)The Windows Filtering Platform has blocked a connectionFiltering Platform Connection
5152 (F)The Windows Filtering Platform blocked a packetFiltering Platform Packet Drop
5155 (F)The Windows Filtering Platform has blocked an application or service from listening on a port for incoming connectionsFiltering Platform Connection
5031 (F)The Windows Firewall Service blocked an application from accepting incoming connections on the networkFiltering Platform Connection

Events 4957 and 4958 are the ones worth wiring into a SIEM permanently. They are the only place Windows tells you it received a rule and declined to use it.

Event Viewer
Log: Microsoft-Windows-Windows Firewall With Advanced Security/Firewall  |  Event ID: 2010
Network profile changed on an interface.
  Adapter GUID:  {aaaaaaaa-0b0b-1c1c-2d2d-333333333333}
  Adapter Name:  CONTOSO-WIFI-1
  Old Profile:   Domain
  New Profile:   Public
Illustrative, with identifiers replaced. This one event explains an entire afternoon of "the rule stopped working".

Turning the audit subcategories on is a Group Policy or Intune job, and it is genuinely per-device policy rather than a firewall setting.

gpedit.mscComputer ConfigurationWindows SettingsSecurity SettingsAdvanced Audit Policy ConfigurationObject AccessAudit Filtering Platform Connection

Do not switch on packet-drop auditing fleet-wide. Microsoft rates the event volume for Audit Filtering Platform Packet Drop as High, states that 5152 "is generated for every received network packet", and recommends no auditing on workstations, member servers and domain controllers alike. Its own guidance is to use 5157 instead, because it "contains almost the same information and generates per-connection, not per-packet". Enable these subcategories on one device, for one investigation, and turn them off afterwards. Filling the Security log is a good way to lose the evidence you actually needed.

Step 5: the firewall log file

The text log is the fastest way to see individual drops without touching audit policy. It records nothing until you ask it to. The default path is %windir%\system32\logfiles\firewall\pfirewall.log and the default maximum size in the Group Policy dialog is 4,096 KB. Microsoft recommends raising that to at least 20,480 KB, notes the maximum is 32,767 KB, and recommends a separate file per profile.

PowerShell - run elevated
Get-Content "$env:windir\System32\LogFiles\Firewall\pfirewall.log" -TotalCount 5 # The header tells you the field order. Never guess it, it is positional. #Version: 1.5 #Software: Microsoft Windows Firewall #Time Format: Local #Fields: date time action protocol src-ip dst-ip src-port dst-port size tcpflags tcpsyn tcpack tcpwin icmptype icmpcode info path pid 2026-08-21 21:23:43 DROP UDP 192.0.2.32 233.252.0.251 5353 5353 86 - - - - - - - RECEIVE 2616 # Broken: action DROP, path RECEIVE means inbound. No allow rule matched this packet. # Healthy for an allowed flow: the same line with ALLOW in the action column. (Get-Acl "$env:windir\System32\LogFiles\Firewall").Access | Where-Object { $_.IdentityReference -like '*mpssvc*' } | Select-Object IdentityReference, FileSystemRights # Must return NT SERVICE\mpssvc with FullControl, or logging fails silently.

Read a DROP line right to left. The path column tells you the direction, RECEIVE for inbound and SEND for outbound, and the pid column gives you the process to blame. Addresses in the block above are RFC 5737 documentation addresses standing in for the real ones from a genuine capture.

Gotcha: the log folder may not exist. Microsoft documents that when logging is configured by policy, the folder in the default or custom path may not exist, and that the fix is to create it manually and grant mpssvc FullControl. Until you do, you get a policy that says logging is on and a device that logs nothing. Check the file's LastWriteTime, not just the setting.

Step 6: the console's own effective view

The Windows Defender Firewall with Advanced Security snap-in has an often-ignored node that shows the merged set. In Microsoft's own lab walkthrough for disabling local merge, step four is to expand Monitoring and select Firewall to see the list of rules active on the local computer, and the expected result once merge is off is that no local rules are listed. If a rule appears under Inbound Rules but not under Monitoring, it is not being enforced.

The fix: scope it right, then decide about merge

Fixing this is a decision tree, not a single setting. Work through it in order.

  1. Confirm the active profile with Get-NetConnectionProfile. If your rule excludes it, widen the rule's scope rather than changing the network category.
  2. Confirm the merge state per profile in the ActiveStore. If merge is off by design, the rule must be deployed centrally, full stop.
  3. Search for an overlapping block rule, because block beats allow and no ordering can save you.
  4. Check 4957 and 4958 to rule out a rule that was received and rejected.

Deploying the rule and the merge settings from Intune

Intune splits this across two profile types: one for per-profile firewall settings, one for the rules themselves.

intune.microsoft.comEndpoint securityFirewallCreate policyWindows 10, Windows 11, and Windows ServerWindows Firewall
  1. Sign in to the Microsoft Intune admin center.
  2. Go to Endpoint security > Firewall > Create policy.
  3. Choose platform Windows 10, Windows 11, and Windows Server and profile Windows Firewall, then select Create.
  4. Enter a name and an optional description, then select Next.
  5. Under Configuration settings, expand each network location type in turn: Domain, Private and Public. Configure all three, even if you only care about one. A device that roams will use whichever you neglected.
  6. For each profile, set Turn on Windows Firewall to Yes, then set Block inbound connections and Block outbound connections to match your standard.
  7. Decide the merge behaviour with Ignore all local firewall rules and Ignore connection security rules. Remember the inverted wording: Yes means local rules are ignored, which is AllowLocalPolicyMerge set to false.
  8. Still per profile, configure Log file path, Enable log dropped packets, Enable log success connections and Log max file size.
  9. Select Next twice, assign the policy to a group containing the target devices, then Next and Create.

The rules themselves go in a separate profile, and this is the one to use when merge is off.

intune.microsoft.comEndpoint securityFirewallCreate policyWindows 10, Windows 11, and Windows ServerWindows Firewall Rules
  1. Create the policy as above, choosing the Windows Firewall Rules profile.
  2. Add a rule and give it a Name and Description. The name must not contain a forward slash, which the CSP rejects.
  3. Set Direction to In or Out and Action to Allowed or Blocked.
  4. Set Network type. Select Domain, Private and Public unless you have a specific reason not to. Leaving the field unselected applies the rule to all network types.
  5. Under Application settings, give a File path such as C:\Program Files\Contoso\app.exe, or a Service name short name when a service rather than an application is sending the traffic. Wildcard paths such as C:\*\app.exe are not supported.
  6. Under Port and protocol settings, set Protocol to 6 for TCP or 17 for UDP, then the local and remote ports.
  7. Under IP address settings, prefer a specific Remote address range, or the token LocalSubnet, over any address.
  8. Assign and create.

If you would rather use a custom policy, the CSP nodes are the same ones the built-in profile drives.

SettingOMA-URIValue
Local firewall rule merge, Domain./Vendor/MSFT/Firewall/MdmStore/DomainProfile/AllowLocalPolicyMergebool, default true
Local IPsec rule merge, Domain./Vendor/MSFT/Firewall/MdmStore/DomainProfile/AllowLocalIpsecPolicyMergebool, default true
Log dropped packets, Public./Vendor/MSFT/Firewall/MdmStore/PublicProfile/EnableLogDroppedPacketsbool, default false
Log file path, Public./Vendor/MSFT/Firewall/MdmStore/PublicProfile/LogFilePathstring, default %systemroot%\system32\LogFiles\Firewall\pfirewall.log
Rules container./Vendor/MSFT/Firewall/MdmStore/FirewallRules/<RuleName>node, must be wrapped in an Atomic block

The same settings in Group Policy

Group Policy exposes both halves in the same properties dialog, per profile tab. This surface is not CSP-only or GPO-only; both exist and both write the values documented earlier.

gpmc.mscComputer ConfigurationPoliciesWindows SettingsSecurity SettingsWindows Defender Firewall with Advanced Security
  1. Open the GPO in the Group Policy Management Editor and expand Computer Configuration > Policies > Windows Settings > Security Settings > Windows Defender Firewall with Advanced Security.
  2. In the details pane, in the Overview section, select Windows Defender Firewall Properties.
  3. Select the tab for the profile you are configuring: Domain Profile, Private Profile or Public Profile.
  4. In the Settings section, select Customize.
  5. In the Rule merging section, set Apply local firewall rules to No to stop honouring local firewall rules.
  6. In the same section, set Apply local connection security rules to No to stop honouring local IPsec rules.
  7. Optionally set Display a notification to No, which suppresses the prompt that otherwise creates rules on the user's behalf.
  8. Select OK to return to the profile tab. Under Logging, select Customize.
  9. Set the log path, raise the size limit, and set Log dropped packets to Yes. Nothing is logged until you do.
  10. Select OK twice, then repeat from step 3 for the other two profiles.

Tip straight from Microsoft's own recommendations. Create your rules in all three profiles, but only enable the firewall rule group on the profiles that suit the scenario. A sharing application used only at home gets rules in all three profiles with the group enabled on Private alone. That way the rule exists everywhere for review and audit, and takes effect in exactly one place. Microsoft also suggests scoping the remote address to LocalSubnet on the private and public profiles while leaving it unrestricted on Domain.

Turning merge off is a one-way door for application owners. Microsoft's warning is explicit: although the setting prevents a local administrator from applying a rule, it also prevents the firewall from prompting the user about a new program and creating an inbound rule when the user approves. If you enable it, you must make sure every program that requires firewall rules has the correct rules defined in your policy. Its own list of reasons an application is blocked ends with exactly this: "Local policy merge is disabled, preventing the application or network service from creating local rules." Plan the inventory before you flip the switch, not after the helpdesk queue does it for you.

Surfaces that do not apply here

Two items on the usual checklist are genuinely not part of this feature, and saying so is more useful than silence. There is no scheduled task under \Microsoft\Windows\ that drives Windows Defender Firewall; enforcement is entirely the MpsSvc service plus the WFP filter engine, and a search of the task library on a live device returns nothing firewall-related. There is also no separate Defender antivirus or attack-surface-reduction setting involved: the firewall shares the Defender name and the Endpoint security node in Intune, but the profile type you need is Firewall or Windows Firewall Rules, not Antivirus and not Attack surface reduction.

Proof it worked: a real posture report

The companion script for this post reads every surface above and prints one report. It is read-only: no Set, New, Remove, Enable or Disable against any rule, service or registry value. It needs no module, because NetSecurity ships with Windows, and it runs on both Windows PowerShell 5.1 and PowerShell 7.

PowerShell - Get-FirewallEffectivePosture.ps1, elevated
.\Get-FirewallEffectivePosture.ps1 # Genuine run on a Windows 11 Enterprise build 26200 device, identifiers replaced. [OK] MpsSvc Windows Defender Firewall Status=Running StartType=Automatic [OK] BFE Base Filtering Engine Status=Running StartType=Automatic [OK] mpsdrv Windows Defender Firewall Authorization Driver Status=Running StartType=Manual [INFO] MpsSvc DependOnService : mpsdrv, bfe, nsi # Healthy: all three running. If BFE is stopped, MpsSvc cannot start either. [INFO] Wi-Fi Category=Public IPv4=Internet [INFO] Firewall profile in force (most restrictive of the above) : Public --- Public profile --- [OK] Enabled : True (local store: True) [INFO] DefaultInboundAction : Block (local store: NotConfigured) [WARN] AllowLocalFirewallRules : False (local store: NotConfigured) [WARN] AllowLocalIPsecRules : False (local store: NotConfigured) [WARN] Merge value differs between the effective and local stores: this profile is being overridden by Group Policy or MDM. # Broken-looking and intentional. NotConfigured locally, False effectively, means # something central set it. Healthy default would be True in both columns. [INFO] PersistentStore 639 rule(s) [INFO] ActiveStore 661 rule(s) [INFO] RSOP 0 rule(s) [INFO] Local 639 rule(s) [INFO] MDM 19 rule(s) [INFO] Dynamic 3 rule(s) # RSOP zero means no GPO firewall policy. All central rules here came from MDM. [WARN] 395 enabled local rule(s) exist while merge is OFF for the Public profile. [WARN] Enabled rules that exclude Public : 118 # The two numbers that answer the ticket. 395 local rules are inert, and 118 more # enabled rules are scoped to profiles this device is not currently using. [OK] C:\WINDOWS\system32\LogFiles\Firewall\pfirewall.log 1815407 bytes [OK] NT SERVICE\mpssvc has FullControl on C:\WINDOWS\system32\LogFiles\Firewall [WARN] Filtering Platform Connection auditing is off, so Security events 5157 and 5156 are not being written. [OK] Microsoft-Windows-Windows Firewall With Advanced Security/Firewall Enabled=True [OK] All required reads succeeded.

That output is the whole argument of this post in one screen. The firewall is healthy, the policy applied cleanly, and 395 rules that look perfect in the console are doing nothing. Nobody would find that by reading the rule list.

Two details are worth calling out because they are the failure modes the script is built to catch. First, the merge column shows NotConfigured locally and False effectively, which is how you tell a central override from a local choice. Second, the script exits 1 and says the report would be misleading if any required read fails, rather than printing a clean summary with blank fields.

Where to get it. Get-FirewallEffectivePosture.ps1 lives in the Windows-11-Scripts repository, under the folder windows-firewall-profile-rule-merge-behaviour. Run it elevated for the audit-policy and log-ACL checks, or pass -SkipAuditPolicy when running unelevated. Add -ShowMismatchedRules and -ShowIgnoredLocalRules to list the rules behind the two warning counts.

References

Community deep-dives, each checked for this post:

AuthorPostWhy it is useful here
Rudy OomsThe Windows Defender Firewall risesWalks the Intune firewall rule deployment end to end and confirms where MDM rules land in the registry: the SharedAccess\Parameters\FirewallPolicy\Mdm\FirewallRules key.
Nickolaj Andersen, MSEndpointMgrManage Windows Firewall rules in Windows 10 with Microsoft IntuneDocuments the console quirk that matters most when verifying: Intune-assigned rules show up under the Monitoring - Firewall node rather than the inbound and outbound rule lists.
PowerShell — companion script

Download it from Imran76Awan/Windows-11-Scripts — no sign-in required. It is read-only: it reports and never changes a device or anything in Intune. Validate it in your own environment before relying on the output.

Get-FirewallEffectivePosture.ps1 — Reports the EFFECTIVE Windows Defender Firewall posture on the local device: per-profile
View all scripts on GitHub
Was this post helpful?
React below — no account needed
Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Windows 11
SMB signing became mandatory and your NAS stopped working:…
Windows 11 24H2 and later require SMB signing, refuse insecure guest logons and ship…
Windows 11
Attack Surface Reduction rules broke a line-of-business app:…
An ASR rule in Block mode kills an app and tells you nothing but a GUID. Here is the…
Windows 11
Controlled folder access blocked your backup software: reading…
Microsoft Defender's controlled folder access blocks untrusted processes writing to…