While individual firewall rules dictate ingress and egress packet filtering on a port-by-port basis, the core behaviour of the Windows Filtering Platform (WFP) is governed by global firewall settings. These settings apply across Domain, Private, and Public network profiles, controlling how Windows Defender Firewall handles stateful packet inspection for complex protocols, certificate revocation lookups for IPsec tunnels, ICMP exemptions, and operational logging. In enterprise environments and hardened client workstations, adjusting these global parameters is critical for network reliability and regulatory compliance.
In Windows 11, the native PowerShell NetSecurity module provides direct access to these low-level filtering options through the Get-NetFirewallSetting and Set-NetFirewallSetting cmdlets. This guide walks through inspecting active firewall engine defaults, enabling stateful FTP inspection, configuring cryptographic certificate validation timeouts, managing IPsec protocol exemptions, and resetting global parameters to baseline defaults.
Understanding Global Firewall Settings in Windows 11
Individual firewall rules operate on top of global engine parameters. While profile-level commands (such as Set-NetFirewallProfile) toggle logging paths and default block/allow actions, the global settings object manages core networking mechanics:
- Stateful FTP Inspection (
EnableStatefulFtp): Dynamically tracks outbound FTP control sessions (port 21) and automatically opens temporary dynamic inbound high-number data ports for passive or active FTP transfers without requiring wide-open inbound firewall rules. - Certificate Validation Binding (
CertValidationBinding): Governs how Windows Defender Firewall validates digital certificates during IKE/AuthIP IPsec negotiations against cryptographic revocation lists (CRLs). - Revocation Check Timeout (
MaxTimeForCertValidation): Controls the maximum duration (in seconds) the firewall will pause a network connection to verify certificate revocation before failing or falling back. - IPsec Exemptions (
Exempt): Determines whether specific baseline discovery protocols—such as ICMPv4, ICMPv6, DHCP, or Neighbour Discovery—are permitted to bypass IPsec cryptographic encryption policies to maintain underlying network stability. - Open Port Authorisation (
RequireAuthorizationForOpenPorts): Controls whether listening service applications require explicit local administrator authorization to bind to open network ports.
Querying the Current Global Firewall Configuration
To inspect active global settings, open an elevated PowerShell prompt (run as Administrator) and execute the Get-NetFirewallSetting cmdlet without additional arguments:
# Retrieve current global firewall settings
Get-NetFirewallSetting
The resulting object displays the active policy parameters:
StatefulFtp : Disabled
RequireAuthorizationForOpenPorts: False
EnablePacketQueue : True
MaxTimeForCertValidation : 15
CertValidationBinding : None
Exempt : {NeighbourDiscovery, Icmp}
PolicyStore : PersistentStore
To inspect specific properties in tabular format for automated security auditing, pipe the output to Format-List or select required fields:
# Query specific global engine parameters
Get-NetFirewallSetting | Select-Object StatefulFtp, RequireAuthorizationForOpenPorts, MaxTimeForCertValidation, Exempt
Enabling and Disabling Stateful FTP Inspection
Legacy File Transfer Protocol (FTP) poses significant challenges for stateful packet firewalls because control commands and data payloads travel across separate TCP connections. When active or passive FTP transfers fail behind a strict firewall, administrators often mistakenly open thousands of inbound ephemeral ports. Enabling stateful FTP inspection instructs the Windows Filtering Platform driver to inspect control packets and dynamically negotiate ephemeral ports:
# Enable stateful FTP protocol inspection
Set-NetFirewallSetting -EnableStatefulFtp True
To verify that stateful inspection is active, check the property directly:
# Verify stateful FTP parameter
(Get-NetFirewallSetting).StatefulFtp
If modern encrypted FTPS (FTP over TLS/SSL) is used, stateful inspection cannot inspect payload commands because the control channel is encrypted. In such environments, disable stateful inspection to reduce firewall processing overhead:
# Disable stateful FTP inspection
Set-NetFirewallSetting -EnableStatefulFtp False
Configuring IPsec Certificate Validation and Timeouts
When Windows 11 systems authenticate secure IPsec connection rules using X.509 digital certificates (AuthIP or IKEv2), the firewall engine validates the certificate chain against CRL distribution points. If network latency delays the revocation query, connection establishment can stall or timeout.
You can fine-tune how strictly certificate validation is enforced and cap the timeout limit:
# Set certificate validation binding to enforce full CRL checks
Set-NetFirewallSetting -CertValidationBinding None
# Adjust maximum certificate validation waiting threshold to 10 seconds
Set-NetFirewallSetting -MaxTimeForCertValidation 10
The -CertValidationBinding parameter supports None (standard validation) or StrongCRL, which enforces strict revocation list verification and rejects handshakes if the CRL distribution endpoint is unreachable.
Managing IPsec Exemptions for Core Network Protocols
In high-security environments where IPsec Connection Security Rules require encryption for all local LAN communications, dropping diagnostic or routing protocols can sever gateway connectivity. The -Exempt parameter defines which protocols are exempt from IPsec requirements.
By default, IPv6 Neighbour Discovery and ICMP are frequently exempted to prevent breaking local link discovery. To restrict exemptions to Neighbour Discovery only (forcing all ICMP traffic to undergo IPsec encryption):
# Restrict IPsec exemptions exclusively to Neighbour Discovery
Set-NetFirewallSetting -Exempt NeighbourDiscovery
To permit both ICMP and Neighbour Discovery alongside DHCP traffic:
# Allow Neighbour Discovery and ICMP exemptions
Set-NetFirewallSetting -Exempt NeighbourDiscovery, Icmp
To verify the configured exemption array:
# View current protocol exemptions
(Get-NetFirewallSetting).Exempt
Hardening Open Port Authorization Requirements
On multi-user systems or workstations hosting developers, non-administrative accounts can occasionally launch user-space listeners on high-numbered ports. By enabling the RequireAuthorizationForOpenPorts parameter, Windows Defender Firewall blocks listening sockets unless the initiating user has explicit administrative rights to open local ports:
# Require administrative authorization for listening sockets
Set-NetFirewallSetting -RequireAuthorizationForOpenPorts True
Automating Firewall Baseline Verification via PowerShell
To incorporate global firewall settings into corporate configuration drift monitoring, use the following validation script. It checks settings against baseline standards and logs non-compliant values:
# Define expected baseline configuration
$Baseline = @{
StatefulFtp = "Disabled"
RequireAuthorizationForOpenPorts = $False
MaxTimeForCertValidation = 15
}
$CurrentSettings = Get-NetFirewallSetting
$NonCompliant = @()
foreach ($Key in $Baseline.Keys) {
if ($CurrentSettings.$Key -ne $Baseline[$Key]) {
$NonCompliant += [PSCustomObject]@{
Setting = $Key
Expected = $Baseline[$Key]
Actual = $CurrentSettings.$Key
}
}
}
if ($NonCompliant.Count -gt 0) {
Write-Warning "Global firewall configuration drift detected:"
$NonCompliant | Format-Table -AutoSize
} else {
Write-Host "Global firewall configuration complies with baseline." -ForegroundColor Green
}
Resetting Global Firewall Settings to Factory Baselines
If misconfigured global parameters cause connection drops or certificate handshake errors, you can restore all global parameters to their initial installation defaults without wiping out custom individual firewall rules:
# Revert global firewall engine settings to factory defaults
Set-NetFirewallSetting -EnableStatefulFtp False -RequireAuthorizationForOpenPorts False -MaxTimeForCertValidation 15 -CertValidationBinding None -Exempt NeighbourDiscovery, Icmp
Configuring global firewall parameters ensures the Windows Filtering Platform provides a consistent, robust networking foundation across all active network adapters and connection security tunnels.