We have to configure the security settings for the SNMP-Service on a Windows Server. But they are missing!

Here are the facts:

  • OS: Windows Server 2012 R2
  • We installed the SNMP feature, that we already configured the service (but we forgot to add another IP under Security tab)
  • We know the issue where you have to restart the SNMP-service after you installed the feature to see the Security tab (so we made already some restarts.)
  • We installed now the DC server role.
  • Now we can not see the Security tab anymore (we don’t know if it has to do something with the installation of the DC role).
  • We really need SNMP for monitoring reasons. (So please don’t advise to use WMI or other things)
  • We used my domain admin when clicking on “SNMP-Service” –> “Properties”
  • What can we do to see the Security tab again? Or is there a possibility to configure the SNMP service via CMD or PowerShell?

  • How to: Set SNMP settings through registry
  • We set up Permitted Managers and Valid Communities.
  • HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\SNMP\Parameters\Permitted Managers
[pastacode lang=”bash” manual=”REG_SZ%0A%0AValue%20name%3A%201%0A%0AValue%20data%3A%20(IP%20address%20of%20monitoring%20server)%0A” message=”bash code” highlight=”” provider=”manual”/] [ad type=”banner”]

HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\SNMP\Parameters\Valid Communities

[pastacode lang=”bash” manual=”REG_DWORD%0A%0AValue%20Data%3A%204%0A%0AValue%20Name%3A%20(community%20string)%0A” message=”bash code” highlight=”” provider=”manual”/]

  • The configuration directive you should add to /etc/snmp/snmpd.conf is:

Code:

[pastacode lang=”bash” manual=”agentaddress%20udp%3A161%0A” message=”bash code” highlight=”” provider=”manual”/]
  • What does netstat say about UDP port 161? This will show you if the socket is in use:

Code:

[pastacode lang=”bash” manual=”netstat%20-lupn%20%7C%20grep%20%3A161%0A” message=”bash code” highlight=”” provider=”manual”/] [ad type=”banner”]
  • And what happens if you try to start snmpd manually with:

Code:

[pastacode lang=”bash” manual=”%2Fusr%2Fsbin%2Fsnmpd%20-c%20%2Fetc%2Fsnmp%2Fsnmpd.conf%0A” message=”bash code” highlight=”” provider=”manual”/]

Categorized in: