Specify communities
Spécifier des communautés
Explanation
This policy setting configures a list of the communities defined to the Simple Network Management Protocol (SNMP) service.
SNMP is a protocol designed to give a user the capability to remotely manage a computer network, by polling and setting terminal values and monitoring network events.
A valid community is a community recognized by the SNMP service, while a community is a group of hosts (servers, workstations, hubs, and routers) that are administered together by SNMP. The SNMP service is a managed network node that receives SNMP packets from the network.
If you enable this policy setting, the SNMP agent only accepts requests from management systems within the communities it recognizes, and only SNMP Read operation is allowed for the community.
If you disable or do not configure this policy setting, the SNMP service takes the Valid Communities configured on the local computer instead.
Best practice: For security purposes, it is recommended to restrict the HKLM\SOFTWARE\Policies\SNMP\Parameters\ValidCommunities key to allow only the local admin group full control.
Note: It is good practice to use a cryptic community name.
Note: This policy setting has no effect if the SNMP agent is not installed on the client computer.
Also, see the other two SNMP settings: "Specify permitted managers" and "Specify trap configuration".
Ce paramètre de stratégie configure une liste de communautés définies dans le service SNMP (Simple Network Management Protocol).
Le protocole SNMP est conçu pour permettre à un utilisateur de gérer à distance un réseau d’ordinateurs, en interrogeant et en définissant les valeurs de terminaux, et en analysant les événements réseau.
Une communauté valide est une communauté reconnue par le service SNMP, alors qu’une communauté est un groupe d’hôtes (serveurs, stations de travail, concentrateurs et routeurs) qui sont administrés ensemble par le protocole SNMP. Le service SNMP est un nœud réseau géré qui reçoit des paquets SNMP à partir du réseau.
Si vous activez ce paramètre de stratégie, l’agent SNMP n’accepte que les demandes des systèmes de gestion appartenant aux communautés qu’il reconnaît ; par ailleurs, seule l’opération de lecture SNMP est autorisée pour la communauté.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, le service SNMP utilise à la place les communautés valides configurées sur l’ordinateur local.
Méthode conseillée : pour des raisons de sécurité, il est recommandé de restreindre la clé HKLM\SOFTWARE\Policies\SNMP\Parameters\ValidCommunities afin de donner le contrôle total uniquement au groupe Administrateurs local.
Remarque : il est recommandé d’utiliser un nom de communauté chiffré.
Remarque : ce paramètre de stratégie n’a aucun effet si l’agent SNMP n’est pas installé sur l’ordinateur client.
Consultez également les deux autres paramètres SNMP : « Spécifier les gestionnaires autorisés » et « Spécifier la configuration des interruptions ».
Registry
HKEY_LOCAL_MACHINE\Software\Policies\SNMP\Parameters- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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: Snmp/SNMP_Communities
$k = 'HKLM:\Software\Policies\SNMP\Parameters\ValidCommunities'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Communities
# Non-additive list: existing values of the key are cleared first
if (Test-Path -Path $k) { (Get-Item -Path $k).Property | ForEach-Object { Remove-ItemProperty -Path $k -Name ([WildcardPattern]::Escape($_)) -ErrorAction SilentlyContinue } }
$values = @('<value1>', '<value2>') # Replace the values with your own
$i = 1
foreach ($v in $values) { Set-ItemProperty -Path $k -Name ('' + $i) -Value $v -Type String; $i++ }Disable
# Disable: Snmp/SNMP_Communities
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Snmp/SNMP_Communities
$k = 'HKLM:\Software\Policies\SNMP\Parameters\ValidCommunities'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| CommunitiesCommunautésSNMP_CommunitiesListbox | List (table)list | Software\Policies\SNMP\Parameters\ValidCommunitiesValues named “” + number | REG_SZ (values under the key) |