Pare-feu Windows Defender : autoriser les exceptions ICMP
Vérifié avec Windows 11 25H2 — mis à jour le 10 juillet 2026
Pris en charge sur : Au minimum Windows XP Professionnel avec SP2
Chemin dans la console GPO
Configuration ordinateur\Modèles d'administration\Réseau\Connexions réseau\Pare-feu Windows Defender\Profil du domaine Description
Définit l'ensemble de types de messages ICMP (Internet Control Message Protocol) que le Pare-feu Windows Defender autorise. Des utilitaires peuvent utiliser les messages ICMP pour déterminer le statut d'autres ordinateurs. Par exemple, la commande Ping utilise le message de demande Echo. Si vous n'activez pas le type de message « Autoriser les requêtes d'écho entrantes », le Pare-feu Windows Defender bloquera les demandes d'écho envoyées par la commande Ping exécutée sur d'autres ordinateurs, mais ne bloquera pas les demandes d'écho sortantes envoyées par la commande Ping exécutée sur l'ordinateur local. Si vous activez ce paramètre de stratégie, vous devrez spécifier la liste des types de messages ICMP que le Pare-feu Windows Defender autorise l'ordinateur local à envoyer ou à recevoir. Si vous désactivez ce paramètre de stratégie, le Pare-feu Windows Defender bloquera tous les types de messages ICMP entrants et sortants répertoriés dans la liste. Par conséquent, les outils qui utilisent les messages ICMP bloqués ne pourront pas envoyer ces messages à ou depuis cet ordinateur. Si vous activez ce paramètre de stratégie en autorisant certains types de messages, puis le désactivez ultérieurement, le Pare-feu Windows Defender supprimera la liste des types de messages que vous aviez autorisés. Si vous ne configurez pas ce paramètre de stratégie, le Pare-feu Windows Defender se comportera comme si vous l'aviez désactivé. Remarque : si un paramètre de stratégie ouvre le port TCP 445, le Pare-feu Windows Defender autorise les requêtes d'écho entrantes, même si le paramètre de stratégie « Pare-feu Windows Defender : autoriser les exceptions ICMP » les bloque. Les paramètres de stratégie qui peuvent ouvrir le port TCP 445 incluent notamment « Pare-feu Windows Defender : autoriser l'exception de partage de fichiers et d'imprimantes », « Pare-feu Windows Defender : autoriser l'exception d'administration à distance » et « Pare-feu Windows Defender : définir les exceptions de ports entrants ». Remarque : les autres paramètres de stratégie du Pare-feu Windows Defender n'affectent que les messages entrants, mais plusieurs options du paramètre de stratégie « Pare-feu Windows Defender : autoriser les exceptions ICMP » affectent les communications sortantes.
Registre
SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings Générateur d'exports
BETAConfigurez l'état, la portée et les options, puis générez les sorties .reg, PowerShell, Intune et SCCM — ou ajoutez le paramètre à une collection multi-paramètres.
Ces exports écrivent le registre — ce n'est pas une GPO managée. ⓘ
Fichier .reg
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Pare-feu Windows Defender : autoriser les exceptions ICMP
; State: Enabled
; Supported on: Au minimum Windows XP Professionnel avec SP2
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings]
"AllowOutboundDestinationUnreachable"=dword:00000000
"AllowOutboundSourceQuench"=dword:00000000
"AllowRedirect"=dword:00000000
"AllowInboundEchoRequest"=dword:00000000
"AllowInboundRouterRequest"=dword:00000000
"AllowOutboundTimeExceeded"=dword:00000000
"AllowOutboundParameterProblem"=dword:00000000
"AllowInboundTimestampRequest"=dword:00000000
"AllowInboundMaskRequest"=dword:00000000
"AllowOutboundPacketTooBig"=dword:00000000 Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Pare-feu Windows Defender : autoriser les exceptions ICMP
# State: Enabled
# Supported on: Au minimum Windows XP Professionnel avec SP2
$path = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'AllowOutboundDestinationUnreachable' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundSourceQuench' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowRedirect' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundEchoRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundRouterRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundTimeExceeded' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundParameterProblem' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundTimestampRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundMaskRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundPacketTooBig' -Value 0 -Type DWord Intune XML
Aucune correspondance directe Policy CSP / OMA-URI pour cette stratégie. Utilisez l'onglet Intune Remediation, ou importez l'ADMX dans Intune. Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Pare-feu Windows Defender : autoriser les exceptions ICMP
# State: Enabled
# Supported on: Au minimum Windows XP Professionnel avec SP2
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundDestinationUnreachable' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundSourceQuench' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowRedirect' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundEchoRequest' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundRouterRequest' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundTimeExceeded' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundParameterProblem' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundTimestampRequest' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundMaskRequest' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundPacketTooBig' -Expected 0 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Pare-feu Windows Defender : autoriser les exceptions ICMP
# State: Enabled
# Supported on: Au minimum Windows XP Professionnel avec SP2
$path = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'AllowOutboundDestinationUnreachable' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundSourceQuench' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowRedirect' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundEchoRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundRouterRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundTimeExceeded' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundParameterProblem' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundTimestampRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundMaskRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundPacketTooBig' -Value 0 -Type DWord Scripts SCCM
# Exported from gporais.com
# Policy: Pare-feu Windows Defender : autoriser les exceptions ICMP
# State: Enabled
# Supported on: Au minimum Windows XP Professionnel avec SP2
# SCCM Configuration Item guidance:
# Create a Configuration Item of type "Setting: Script".
# Discovery script: use the Detection script below.
# Remediation script: use the Remediation script below.
# Compliance rule: the Discovery script output equals 'Compliant'.
# === Detection script ===
# Exported from gporais.com
# Policy: Pare-feu Windows Defender : autoriser les exceptions ICMP
# State: Enabled
# Supported on: Au minimum Windows XP Professionnel avec SP2
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundDestinationUnreachable' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundSourceQuench' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowRedirect' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundEchoRequest' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundRouterRequest' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundTimeExceeded' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundParameterProblem' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundTimestampRequest' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundMaskRequest' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundPacketTooBig' -Expected 0 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Pare-feu Windows Defender : autoriser les exceptions ICMP
# State: Enabled
# Supported on: Au minimum Windows XP Professionnel avec SP2
$path = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'AllowOutboundDestinationUnreachable' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundSourceQuench' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowRedirect' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundEchoRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundRouterRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundTimeExceeded' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundParameterProblem' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundTimestampRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowInboundMaskRequest' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'AllowOutboundPacketTooBig' -Value 0 -Type DWord Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).