Windows Defender Firewall: Allow inbound UPnP framework exceptions
Pare-feu Windows Defender : autoriser les exceptions d'infrastructure UPnP entrante
Explanation
Allows this computer to receive unsolicited inbound Plug and Play messages sent by network devices, such as routers with built-in firewalls. To do this, Windows Defender Firewall opens TCP port 2869 and UDP port 1900.
If you enable this policy setting, Windows Defender Firewall opens these ports so that this computer can receive Plug and Play messages. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is selected and administrators cannot clear it.
If you disable this policy setting, Windows Defender Firewall blocks these ports, which prevents this computer from receiving Plug and Play messages. If an administrator attempts to open these ports by adding them to a local port exceptions list, Windows Defender Firewall does not open the ports. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is cleared and administrators cannot select it.
If you do not configure this policy setting, Windows Defender Firewall does not open these ports. Therefore, the computer cannot receive Plug and Play messages unless an administrator uses other policy settings to open the required ports or enable the required programs. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is cleared. Administrators can change this check box."
Autorise l'ordinateur local à recevoir des messages Plug-and-Play non sollicités émis par les périphériques réseau tels que les routeurs avec pare-feu intégrés. Dans ce but, le Pare-feu Windows Defender ouvre le port TCP 2869 et le port UDP 1900.
Si vous activez ce paramètre de stratégie, le Pare-feu Windows Defender ouvre ces ports et autorise l'ordinateur à recevoir des messages Plug-and-Play. Vous devez spécifier les adresses IP ou les sous-réseaux depuis lesquels les messages entrants sont autorisés. Dans le composant Pare-feu Windows Defender du Panneau de configuration, l'option « Infrastructure UPnP » est sélectionnée et l'administrateur ne peut pas la désélectionner.
Si vous désactivez ce paramètre de stratégie, le Pare-feu Windows Defender bloque ces ports et empêche cet ordinateur de recevoir des messages Plug-and-Play. Si un administrateur tente d'ouvrir ces ports en les ajoutant à une liste d'exceptions de ports locaux, le Pare-feu Windows Defender n'ouvre pas les ports. Dans le composant Pare-feu Windows Defender du Panneau de configuration, la case à cocher « Infrastructure UPnP » sera désactivée et les administrateurs ne pourront pas l'activer.
Si vous ne configurez pas ce paramètre de stratégie, le Pare-feu Windows Defender n'ouvrira pas ces ports. L'ordinateur ne peut donc pas recevoir de messages Plug-and-Play, sauf si un administrateur utilise d'autres paramètres de stratégie pour ouvrir les ports requis ou activer les programmes requis. Dans le composant Pare-feu Windows Defender du Panneau de configuration, l'option « Infrastructure UPnP » est désélectionnée. Les administrateurs pourront modifier cette case à cocher.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\UPnPFramework- Value name
Enabled
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: WindowsFirewall/WF_UniversalPlugAndPlay_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\UPnPFramework'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value 1 -Type DWord
# Allow unsolicited incoming messages from these IP addresses
Set-ItemProperty -Path $k -Name 'RemoteAddresses' -Value '<value>' -Type StringDisable
# Disable: WindowsFirewall/WF_UniversalPlugAndPlay_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\UPnPFramework'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsFirewall/WF_UniversalPlugAndPlay_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\UPnPFramework'
Remove-ItemProperty -Path $k -Name 'Enabled' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'RemoteAddresses' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Allow unsolicited incoming messages from these IP addresses:Autoriser les messages entrants non sollicités provenant des adresses IP suivantes :WF_Scope_Name | Text boxtext | RemoteAddresses | REG_SZ |