Skip to content

Firewall Configuration

⚠ Note: SenseOn detects and responds to malicious and suspicious activity. It is not a host firewall, and it does not enforce firewall rules for you. You can retire a third-party endpoint suite at the same time as you deploy SenseOn. In that case, you can move the host firewall of that suite to native Microsoft tools. This guide tells you how to configure Microsoft Defender Firewall with Microsoft Intune, Active Directory Group Policy or Microsoft Configuration Manager.

This guide applies to Windows 10 22H2 and Windows 11. Product versions, policy names and the navigation paths in the admin centre change over time. Before you rely on a specific setting, make sure that it agrees with the linked source.

For the browser part of a third-party suite replacement, refer to Browser Security Policy. That part includes stricter SmartScreen and Safe Browsing settings, URL allow and block lists, and extension control.

What this replaces, and what it does not

Microsoft Defender Firewall with Advanced Security is a real replacement for the firewall module of a third-party suite. You configure it centrally, so that the domain, private and public profiles work in the same way across the estate. It does not replace a perimeter firewall or a network content filter. This guide covers only the host firewall.


Choosing between Intune and Group Policy

Device estate Recommended control plane Reasoning
Microsoft Entra joined, Intune enrolled Intune endpoint security policy The only option. There is no domain that can serve Group Policy, and reports are built in.
Domain joined only, no MDM Group Policy Mature and immediate, with no licence dependency. Rules are in the GPO store, and you cannot edit them locally.
Hybrid joined and co-managed Select one authority for each workload, and do not change it The two channels both deliver settings. Split ownership is the most common cause of firewall behaviour that has no explanation.
Mixed estate, phased cloud migration Group Policy for the domain joined population, Intune for the cloud population, with the same baseline expressed in both Keep the two definitions in a single source document, so that they do not drift.
Configuration Manager (SCCM) estate Co-manage to Intune, or use Configuration Items and baselines Configuration Manager has no dedicated firewall profile. For the options and trade-offs, refer to Configuring with Microsoft Configuration Manager.

Do not manage the same setting from both

Windows evaluates firewall rules from more than one store. Group Policy rules and MDM rules both apply, and the effective rule set is the union of them. When two authorities configure profile-level settings, such as the default inbound action, the result is less predictable. Intune then reports a conflict, and it does not apply a value.

⚠ Common failure: Before you configure anything, decide which authority owns each device group. Record that decision. For example, a device can get an outbound block default from Group Policy and an allow list of outbound rules from Intune. The rules merge, and the two authorities contest the default action. The result can be different after each reboot and policy refresh.

For co-managed devices, move the Endpoint Protection workload to Intune in Configuration Manager before you build the Intune firewall policy. Also remove or unlink the equivalent GPO from the same device population.


Preparing for the firewall migration

Decommissioning the incumbent firewall

A third-party firewall registers itself with Windows as the active firewall. As a result, Windows Firewall becomes inactive. When you remove the product, the native firewall does not always come back correctly. Thus, do the checks that follow before you start, and do not assume that they pass.

  1. Confirm the vendor uninstall is complete. Run the removal tool from the vendor. Do not rely on Add or Remove Programs. Leftover Windows Filtering Platform callout drivers silently drop traffic that the Windows Firewall log shows as allowed.
  2. Confirm the firewall service is running. Make sure that MpsSvc is set to Automatic and is started. The Base Filtering Engine (BFE) must also run, because MpsSvc depends on it.
  3. Confirm Windows Firewall has taken back over. Make sure that Get-NetFirewallProfile -All | Select-Object Name, Enabled returns True for all three profiles.
  4. Check for orphaned local rules. Many suites write local firewall rules when they install. Before you switch local rule merging off, export these rules. Then examine them, because after the switch these rules do not apply.
  5. Check network profile classification. Domain joined machines that are not on the corporate network use the Public profile. If the baseline for Public is much stricter than for Domain, remote workers see the effect first. To do a check, use Get-NetConnectionProfile.

💡 Sequencing: If possible, deploy the firewall policy before you remove the vendor product. The policy stays inactive while the third-party firewall is registered. It takes effect immediately when you uninstall the incumbent firewall. This prevents a period when the endpoint has no host firewall at all.

Baseline design decisions

Four decisions control all the work that follows. Make these decisions explicitly. Write them down.

Decision Recommendation Why
Default inbound action Block on all three profiles This is the Windows default and the control with the highest value. If you block inbound traffic and have a small allow list, you stop lateral movement. Lateral movement is the threat that a host firewall really addresses.
Default outbound action Allow at first. Change to Block only when you have a mature application inventory and a tested rule set. Outbound blocking is the stage where firewall projects go wrong. It must have a complete allow list that covers each line-of-business application, update service and agent. Plan it as a second phase. Do not make it a condition for the launch.
Local rule merging Off in production. Leave on during the pilot. When merging is off, only centrally defined rules apply. This gives a deterministic estate. If you turn merging off too early, you hide the local rules that are not in your catalogue yet.
Notifications Off Prompts encourage users to click through them. Standard users also cannot create a rule. Thus, the prompt has no value. Keep the signal in the logs as an alternative.

This is a sensible baseline to start with for a corporate Windows estate. It is deliberately conservative for outbound traffic and deliberately strict for inbound traffic.

Setting Domain Private Public
Firewall state On On On
Inbound connections Block Block Block
Outbound connections Allow (phase 1) Allow (phase 1) Allow (phase 1)
Stealth mode Enabled Enabled Enabled
Display a notification No No No
Allow unicast response to multicast Yes Yes No
Apply local firewall rules No No No
Apply local connection security rules No No No
Log dropped packets Yes Yes Yes
Log successful connections Pilot only Pilot only Pilot only
Log size limit 20,480 KB 20,480 KB 20,480 KB

Keep stealth mode enabled. To do this, do not set the settings of the "disable stealth mode" type. The Intune setting names have negative words. Thus, to keep stealth mode on, set Block stealth mode to Not configured. The Intune profile table gives the exact words.


Configuring the firewall with Microsoft Intune

Where the settings live

Intune divides the firewall configuration into two separate profile types. Usually, you deploy one of each type.

Microsoft Intune admin centre > Endpoint security > Firewall > Create Policy > Platform: Windows > Profile

Profile Purpose
Windows Firewall Profile level configuration. Firewall on or off, default actions, stealth mode, notifications, merge behaviour, logging, and the global IPsec and packet queuing settings.
Windows Firewall Rules The individual allow and block rules. Ports, protocols, applications, services, address ranges and interface types.
Windows Hyper-V Firewall Rules Rules that apply to Hyper-V containers such as WSL and Windows Subsystem for Android. Applicable only where developers run WSL.

Creating the Windows Firewall profile

Create the policy. Give it a name that shows the ring and the intent, for example WFW - Baseline - Pilot. Then configure the settings that follow. The table maps the Intune setting names to the related Firewall CSP values. Thus, you can compare them with the values on a device.

Intune setting name Set to Firewall CSP node
Turn on Windows Firewall True EnableFirewall = true
Block inbound connections True DefaultInboundAction = 1
Block outbound connections Not configured (phase 1) DefaultOutboundAction = 0
Block stealth mode Not configured DisableStealthMode = false
Disable inbound notifications True DisableInboundNotifications = true
Block unicast responses to multicast broadcasts True on Public only DisableUnicastResponsesToMulticastBroadcast
Ignore all local firewall rules True (phase 2) AllowLocalPolicyMerge = false
Ignore connection security rules True AllowLocalIpsecPolicyMerge = false
Ignore authorised application firewall rules True (phase 2) AuthAppsAllowUserPrefMerge = false
Ignore global port firewall rules True (phase 2) GlobalPortsAllowUserPrefMerge = false
Enable shielded mode Not configured Shielded = false

These settings show three times, once in each of the Domain, Private and Public network sections. There is also a global section, which covers these settings:

  • stateful FTP
  • security association idle time
  • pre-shared key encoding
  • IPsec exemptions
  • certificate revocation list verification
  • packet queuing

If you do not have a specific IPsec design, keep those settings at Not configured.

⚠ Shielded mode: Do not put shielded mode in the standard profile. Shielded mode blocks all inbound traffic, and it ignores all allow rules. This includes your remote management path. Shielded mode is an incident response control, not a baseline setting.

Logging in Intune. The log settings (EnableLogDroppedPackets, EnableLogSuccessConnections, LogFilePath, LogMaxFileSize) work only on Windows 11 22H2 or later. To set the logs on Windows 10, you must use Group Policy, a local script or a Configuration Service Provider custom profile. If the estate is mixed, configure the logs by GPO for the Windows 10 population. Accept that Intune covers the Windows 11 population.

Creating the Windows Firewall Rules profile

Each rules profile supports up to 150 custom rules. Rules in different profiles merge on the device if they do not conflict. Thus, you can have more than 150 rules in total if you divide them across several profiles. Arrange the profiles by purpose. Do not fill one profile to its maximum.

Suggested profile Contents
WFW Rules - Core Management Remote management inbound rules, endpoint agent traffic, patching and software distribution.
WFW Rules - Line of Business Application specific rules, one profile per major application family.
WFW Rules - Blocks Explicit deny rules. Keep these rules separate, so that they are easy to audit and easy to remove in an emergency.

For each rule, you usually set these fields:

  • name
  • direction
  • action
  • the network types that the rule applies to
  • protocol
  • local and remote port ranges
  • local and remote address ranges
  • application path or package family name
  • service name

⚠ Conflicting rules: To prevent conflicts, name rules consistently. Also keep one owner for each rule family. If two rules profiles configure the same item differently, Intune delivers both, and the device reports a conflict. This is different from the Windows Firewall profile type. With that type, Intune does not send a setting that conflicts.

Reusable settings groups

Do not repeat the same IP ranges or fully qualified domain names across dozens of rules. Define them once.

Endpoint security > Firewall > Reusable settings > Add

A reusable settings group holds remote IP address ranges and domain name definitions with automatic resolution. In a rule, add a reference to the group. When you update the group, the update applies to each rule that uses the group. Inbound rules that target a name have no native support. Thus, an inbound rule that targets a name must have a pre-resolution script. This script writes the resolved addresses into an IP-based rule.

Assignment and conflict behaviour

  • Assign the policies to device groups, not to user groups. Firewall configuration is a property of the device.
  • Build one policy set for each ring. Assign each set to its own dynamic device group. Do not use one policy with exclusions for all rings.
  • Windows Firewall profiles conflict with each other. They also conflict with firewall settings from device configuration profiles. When Intune detects a conflict, it does not send the setting to the device at all. Thus, a conflict gives no protection, not partial protection. After each ring, examine the per setting status in the policy report.
  • Windows Firewall profiles do not conflict with Windows Firewall Rules profiles. This is the reason for the two profile types.

Configuring the firewall with Active Directory Group Policy

Creating and linking the GPO

  1. Open Group Policy Management on a domain controller or a management workstation with RSAT installed.
  2. Right-click the OU that contains your pilot computer objects and select Create a GPO in this domain, and Link it here.
  3. Give the GPO a name that describes it, for example SEC - Windows Firewall - Baseline - Ring 1.
  4. Edit the GPO.
  5. Go to the firewall node:

Computer Configuration > Policies > Windows Settings > Security Settings > Windows Defender Firewall with Advanced Security

A second, older node under Administrative Templates also shows firewall settings:

Computer Configuration > Policies > Administrative Templates > Network > Network Connections > Windows Defender Firewall

⚠ Use one node, not both: Use the Security Settings node for all settings. Keep the Administrative Templates node at Not Configured. The Administrative Templates node is the legacy interface. It uses a different profile model (Domain and Standard, not Domain, Private and Public). If you configure both nodes, the settings that result are difficult to understand.

Profile properties

In the right-hand pane of the Security Settings node, click Windows Defender Firewall Properties. A dialog with four tabs opens: Domain Profile, Private Profile, Public Profile and IPsec Settings. Configure the first three tabs in the same way, except where the baseline is different.

Field Set to Notes
Firewall state On (recommended) Set explicitly, not left at Not configured, so that Windows enforces and reports the setting.
Inbound connections Block (default) "Block all connections" is the stricter option and ignores allow rules. Do not use it in a baseline.
Outbound connections Allow (default) Change to Block only in phase 2, and only after you prove the outbound allow list.
Protected network connections Customise, all adapters ticked Makes sure that no user or installed virtual adapter is outside the firewall.

Under Settings > Customise:

Field Domain / Private Public
Display a notification No No
Allow unicast response Yes No
Rule merging: Apply local firewall rules No No
Rule merging: Apply local connection security rules No No

Rule merging and local administrator lockout

When you set Apply local firewall rules to No, the estate becomes deterministic. With this setting at No, Windows stores local rules but never applies them. This includes rules from a local administrator or from an application installer. Only rules from the GPO take effect.

This is the correct end state, but it has two consequences. Plan for them:

  • Some application installers create their own firewall rules. These installers seem to succeed, but then the application does not work. Each such application must have a rule in the GPO.
  • Support staff can no longer unblock something quickly on a single machine. Build a documented break-glass path. This is usually a separate GPO, scoped to a security group. Support staff can temporarily add a computer object to that group.

Logging

On each profile tab, under Logging, click Customise.

Field Value
Name %windir%\system32\logfiles\firewall\pfirewall_Domain.log (and _Private, _Public on the other tabs)
Size limit 20,480 KB. The maximum is 32,767 KB.
Log dropped packets Yes
Log successful connections Yes during pilot, No in steady state

⚠ Permissions: Create the log folder before the policy applies. If the folder does not exist when the policy applies, the logs do not work, and no error shows. Give Full Control on the folder and its files to NT SERVICE\mpssvc. Deploy these changes as a startup script or a Configuration Manager step, together with the GPO.

Separate log files for each profile are worth the small extra effort. When a laptop is on the wrong network profile, the log for that profile immediately tells you which rule set applied.

Creating rules in the GPO

Under the same Security Settings node, expand Inbound Rules or Outbound Rules. Right-click and select New Rule. The wizard offers the Program, Port, Predefined and Custom rule types.

  • It is better to use Program or Custom rules scoped to a specific executable than broad Port rules. A port rule opens the port for all software on the machine.
  • Use Predefined rules for Windows roles such as File and Printer Sharing, Remote Desktop and Windows Management Instrumentation. These rules already have the correct port and service scope.
  • Where possible, scope each inbound rule with a remote address range. A management rule that accepts connections only from the management subnet is much stronger than the rule without a scope.
  • You cannot edit or delete rules from the GPO on the endpoint. This is the intended behaviour.

You can also use PowerShell to write rules on a reference machine. Then export the rules and import them into the GPO. For large rule sets, this method is faster than the wizard.

# Export the current rule set from a reference machine
netsh advfirewall export "C:\Temp\firewall-baseline.wfw"

# Import into a GPO from the Group Policy Management Editor:
# right-click "Windows Defender Firewall with Advanced Security" > Import Policy

⚠ Import replaces: Before you import a policy file into a GPO, export the current GPO configuration. The import overwrites the full firewall configuration in that GPO, which includes all the rules that it has now.

Migrating a rule set from a CSV instead. If you already have the rules as a map from a third-party product, use Automated Firewall Rule Migration. That page gives a PowerShell script and a CSV template that you can download. They do these tasks:

  • They import rules from a spreadsheet.
  • They apply the recommended baseline of this page to the profile settings of the GPO.
  • They link and push the GPO.
  • They test the result with a real reachability test.

This route is for Group Policy only. You must still read the baseline design decisions on this page first.


Precedence, filtering and troubleshooting

  • Firewall rules from more than one GPO are cumulative. Windows evaluates all rules from all applied GPOs together. Thus, for rules, there is no "last GPO wins" behaviour.
  • Profile settings, such as the default inbound action, follow normal GPO precedence. Thus, the GPO with the highest link order at the closest OU wins.
  • Deny rules always win over allow rules. It does not matter which GPO delivered them.
  • To keep servers out of a client baseline, use security filtering or a WMI filter. A WMI filter on ProductType = 1 restricts a GPO to client operating systems.
  • gpresult /h report.html on an affected endpoint shows which GPOs applied. Get-NetFirewallRule -PolicyStore ActiveStore shows the merged, effective rule set.

Configuring with Microsoft Configuration Manager (SCCM)

Configuration Manager (formerly SCCM, now Microsoft Configuration Manager) does not have a dedicated firewall policy profile such as the profile in Intune endpoint security. If your management plane is Configuration Manager and not Intune, there are three realistic routes. The sections that follow give them in the sequence of preference. The same routes apply to browser policy, which Browser Security Policy covers.

Co-manage and use Intune for these workloads

This route gives the largest policy set for the least effort. It is the recommended route for co-managed devices.

In the Configuration Manager console, move the Endpoint Protection workload (which contains Windows Firewall) to Intune. Then do the steps in Configuring the firewall with Microsoft Intune. For browsers, also do the steps in the Intune sections in Browser Security Policy.

The two channels both deliver settings. Thus, keep one owner for each device group. Also unlink each equivalent GPO from the same population.

Configuration Items and baselines

For estates that must stay on Configuration Manager, put the settings in Configuration Items. Put the Configuration Items into a Configuration Baseline. Deploy the baseline with remediation enabled, so that Configuration Manager corrects drift on a schedule.

  • Firewall profile settings. The built-in Windows Defender Firewall Policies node (Assets and Compliance > Endpoint Protection > Windows Defender Firewall Policies) sets the state of each profile and the default inbound and outbound actions. The Endpoint Protection point site system role is necessary for this node. The node covers only profile-level settings, not individual rules.
  • Firewall rules. It is difficult to express rules as Configuration Items. The reliable method is to write the rule set on a reference machine. Then export it with netsh advfirewall export. Then deploy the .wfw file with a script-based Configuration Item that imports it with netsh advfirewall import. Give each exported file a version, so that you can deploy a known-good baseline again.

For browser policy under Configuration Manager, refer to Deploying browser policy with Configuration Manager.

Deploy Group Policy alongside Configuration Manager

Most Configuration Manager estates are also domain joined. In that case, the Group Policy sections give the simplest method to deliver firewall policy. Use Configuration Manager only for software distribution and reports. With this method, you do not have to express the rules again as Configuration Items.

💡 Which route? Co-management gives you the Intune policy set for the least effort. Configuration Items and baselines keep everything in Configuration Manager, but firewall rules must have scripts. Group Policy is the least work if the estate is domain joined. For all routes, select one owner for each setting. The rule that you must not manage the same setting from two authorities also applies here.


Rule baseline and exception handling

Inbound rule baseline

When inbound traffic is blocked by default, the table that follows gives a typical minimum allow list for a managed corporate client. Scope each rule to the smallest sensible remote address range.

Rule Scope Notes
Core Networking (predefined group) All profiles DHCP, DNS, IPv6 transition, ICMPv6 neighbour discovery. If you break these rules, you break the machine.
Remote Desktop Domain only, management subnets Only where RDP to clients is really necessary. Think about the full removal of this rule.
Windows Management Instrumentation Domain only, management subnets Necessary for inventory and remote administration tools.
Remote Assistance / Quick Assist Domain only Only if the service desk uses it.
File and Printer Sharing Domain only, or removed Client to client SMB is a lateral movement path. If no business process depends on it, block it.
Endpoint agent management channel Domain and Private Read the vendor documentation to find out if an inbound rule is necessary at all. Most agents are outbound only.
Configuration Manager / remote control Domain only, site server ranges Where Configuration Manager is in use.

💡 Highest-value inbound restriction: Block inbound SMB, RPC and RDP between clients, but keep them open from server and management ranges. This removes the lateral movement paths that attackers abuse most frequently in a Windows estate. If you do only one thing with the host firewall, do this.

Outbound rules and the path to outbound blocking

Outbound blocking is worth the effort, but it frequently starts too early. This is a workable sequence:

  1. Instrument. Log successful connections on a representative sample of endpoints for two to four weeks. Make sure that this period includes the month end and all periodic processes.
  2. Inventory. Build the allow list from the logs and the application catalogue. Expect to find agents, update services, licence check-ins and telemetry that nobody documented.
  3. Model. Deploy the outbound allow rules, but keep the default action at Allow. Nothing changes for users, and you can make sure that the rules match the traffic that you expect.
  4. Flip a ring. Change the default outbound action to Block for the pilot ring only. Keep the change in its own policy, so that you can withdraw it separately.
  5. Expand. Move one ring at a time, with a defined soak period between rings.

Your goal can be to stop command and control traffic, and not general egress control. In that case, DNS filtering and proxy egress control usually give more than host-based outbound blocking, for less operational cost.

Running an exception process

After you turn off local rule merging, each exception is a central change. If you do not have a process, the exceptions become a bottleneck that stops the project.

  • Standard exceptions get a named rule in the appropriate rules profile or GPO, with an owner and a review date.
  • Temporary exceptions go into a short-lived policy with a clear name. The policy applies to a specific group, and has a diary entry for its removal.
  • Break glass is a pre-built policy that relaxes a specific control. By default, it is not assigned. A named group can assign it under change control.
  • Review the full rule set a minimum of two times each year. Rules accumulate, and nobody removes them unless a review is scheduled.

A minimal exception record must contain:

  • the application
  • the direction
  • the protocol and ports
  • the remote scope
  • the business justification
  • the requester
  • the approver
  • the review date

Deployment and rollout

The ring model and the audit-first method in this section also apply to browser policy. If you deploy both at the same time, use the same rings for both. Browser Security Policy covers the steps to audit and monitor browsers.

Ring model

Ring Population Soak Purpose
Ring 0 IT team, 5 to 20 devices 1 week Find obvious breakage. The affected people can diagnose it themselves.
Ring 1 Volunteers across departments, 5 per cent 2 weeks Cover the variety of applications and work patterns. This ring must include remote workers and a minimum of one device of each laptop build.
Ring 2 25 to 30 per cent 2 weeks Load test the exception process, not the technology.
Ring 3 Remainder Ongoing Full deployment.

In each ring, include one or more devices that are usually off the corporate network. The Public profile baseline is the baseline that causes unexpected problems for people.

Audit first, enforce second

Before you enforce each control, deploy it in a state that you can observe and that does not block traffic.

Control Audit state Enforced state
Inbound blocking This is already the Windows default. Thus, it is effectively enforced already. Before you make the allow list stricter, review the dropped packet logs. Allow list trimmed to the inbound baseline.
Outbound blocking Rules deployed, default action still Allow, successful connections logged. Default action Block.
Local rule merging Merging still on. Make an inventory of local rules across the estate. Merging off.

Monitoring and reporting

Intune

  • Endpoint security > Firewall > Summary gives the aggregate assignment status. The MDM Firewall status for Windows report shows the firewall state of each device.
  • Reports > Endpoint security > Firewall gives a detailed status for each device and each setting.
  • Open each policy. Examine the Per setting status. A setting in Conflict does not apply at all. Thus, treat conflicts as failures, not as warnings.

Group Policy

  • gpresult /h or the Group Policy Results wizard gives the result for each device.
  • The Microsoft-Windows-Windows Firewall With Advanced Security/Firewall event log records rule and profile changes.
  • The pfirewall_*.log files hold the real traffic decisions. Send these files to your SIEM or endpoint platform. Do not read them on the device.

Troubleshooting

Symptom Likely cause and check
Policy shows as applied but the firewall is off A third-party firewall is still registered with Windows as the active firewall, or MpsSvc is stopped. Examine Get-NetFirewallProfile -All and the service state.
An application worked in the pilot and broke at enforcement It relied on a local rule that its installer created. Local rule merging is now off. Add a central rule.
Rules apply on some devices and not others Ring assignment overlap, or the device gets both GPO and Intune firewall policy. For the merged set, examine Get-NetFirewallRule -PolicyStore ActiveStore. For GPO sources, examine gpresult.
Logging configured but no log file The log folder did not exist when policy applied, or NT SERVICE\mpssvc does not have Full Control on it.
Intune setting shows Conflict Two policies configure the same setting. Intune does not deliver the setting at all. Remove the duplicate assignment.
Remote workers lose connectivity to something after rollout They are on the Public profile, which has a stricter baseline. To make sure, use Get-NetConnectionProfile.

Rollback

Design the rollback before the deployment. Keep each enforcement step in its own policy object. Then you can withdraw one step and keep the rest of the baseline.

  • Intune. When you remove an assignment, Intune retracts the policy at the next check-in. This can take up to eight hours. If it is urgent, use a device sync from the admin centre or Company Portal. When you remove some firewall settings, they do not revert to their prior value. They revert to the Windows default. Thus, record the prior state.
  • Group Policy. Unlink the GPO, but do not delete it, so that the configuration stays. Then run gpupdate /force, or wait for the standard refresh interval. This interval is 90 minutes, plus a random offset of up to 30 minutes.
  • Emergency local override. Have a documented, approved procedure that lets a local administrator run Set-NetFirewallProfile on a single machine. Know that a policy refresh overwrites this change.

Go live checklist

  • [ ] Control plane decided and recorded for each device group, with no overlap between Intune and Group Policy
  • [ ] Third-party firewall uninstall tested on a sample, with no leftover filtering drivers
  • [ ] MpsSvc and BFE started and set to Automatic across the sample
  • [ ] All three profiles shown as enabled by Get-NetFirewallProfile
  • [ ] Baseline profile settings deployed, with clean reports and zero settings in Conflict
  • [ ] Inbound allow list agreed, scoped to remote address ranges, and documented with owners
  • [ ] Logs configured, log folder created, permissions given, and new entries shown in the log files
  • [ ] Firewall logs forwarded to the SIEM or endpoint platform
  • [ ] Break-glass procedure written, tested and communicated to the service desk
  • [ ] Exception request process live with a named approver
  • [ ] Rollback procedure documented and tested in Ring 0
  • [ ] Review date set for the full rule set, no more than six months in the future

Appendix A: verification commands

Firewall state and profiles

# Are all three profiles on, and what are the default actions?
Get-NetFirewallProfile -All |
  Select-Object Name, Enabled, DefaultInboundAction, DefaultOutboundAction,
    AllowLocalFirewallRules, AllowLocalIPsecRules,
    LogAllowed, LogBlocked, LogFileName, LogMaxSizeKilobytes |
  Format-List

# Which network profile is this adapter using right now?
Get-NetConnectionProfile

# Firewall service and its dependency
Get-Service MpsSvc, BFE | Select-Object Name, Status, StartType

Rules and their source store

# The effective, merged rule set
Get-NetFirewallRule -PolicyStore ActiveStore |
  Where-Object Enabled -eq 'True' |
  Select-Object DisplayName, Direction, Action, Profile |
  Sort-Object Direction, DisplayName

# Only rules delivered by Group Policy
Get-NetFirewallRule -PolicyStore RSOP

# Locally defined rules, which will not apply once merging is off
Get-NetFirewallRule -PolicyStore PersistentStore |
  Select-Object DisplayName, Direction, Action, Enabled

# Resolve a rule to its ports and addresses
Get-NetFirewallRule -DisplayName 'Remote Desktop*' |
  ForEach-Object {
    [PSCustomObject]@{
      Name    = $_.DisplayName
      Ports   = ($_ | Get-NetFirewallPortFilter).LocalPort -join ','
      Remote  = ($_ | Get-NetFirewallAddressFilter).RemoteAddress -join ','
      Program = ($_ | Get-NetFirewallApplicationFilter).Program
    }
  }

Policy delivery

# Which GPOs applied to this machine
gpresult /h C:\Temp\gpo-report.html /f

# Force a Group Policy refresh
gpupdate /force

# Read the MDM firewall configuration from the registry
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\PolicyManager\current\device\Firewall' -Recurse -ErrorAction SilentlyContinue

Reading the firewall log

# Last 50 dropped packets from the domain profile log
Get-Content "$env:windir\system32\logfiles\firewall\pfirewall_Domain.log" -Tail 50 |
  Where-Object { $_ -match ' DROP ' }

# Top blocked destination ports over the whole log
Get-Content "$env:windir\system32\logfiles\firewall\pfirewall_Domain.log" |
  Where-Object { $_ -match ' DROP ' } |
  ForEach-Object { ($_ -split '\s+')[7] } |
  Group-Object | Sort-Object Count -Descending | Select-Object -First 20

Appendix B: registry and CSP reference

Component Location
Firewall CSP (MDM) ./Vendor/MSFT/Firewall/MdmStore/DomainProfile/ (also PrivateProfile and PublicProfile)
Firewall CSP rules ./Vendor/MSFT/Firewall/MdmStore/FirewallRules/
Group Policy Central Store %systemroot%\sysvol\domain\policies\PolicyDefinitions
Firewall logs (recommended) %windir%\system32\logfiles\firewall\pfirewall_Domain.log (also _Private and _Public)

Sources

All URLs were correct on 17 August 2026.

Windows Defender Firewall