Configurar SNMP en Windows
Para habilitar SNMP (Simple Network Management Protocol) en Windows, puedes copiar lso siguientes archivos
o seguir el siguiente procedimiento, que incluye la instalación de las características necesarias y la configuración
de reglas de firewall.
Habilitar_SNMP.ps1
Habilitar_SNMP.reg
Procedimiento para habilitar SNMP en Windows:
A continuación se detallan los comandos que has proporcionado y la explicación de cada paso:
1. Instalar el cliente de Telnet (opcional):
Aunque no está directamente relacionado con SNMP, puedes instalar el cliente de Telnet si es necesario para
otras operaciones de red.
powershell.exe Install-WindowsFeature -name Telnet-Client
2. Instalar el servicio SNMP:
Este comando instala el servicio SNMP en el servidor Windows.
powershell.exe -command "Add-WindowsFeature SNMP-Service"
3. Instalar el proveedor SNMP-WMI:
Este comando instala el proveedor SNMP-WMI, que permite la integración de SNMP con WMI (Windows
Management Instrumentation).
powershell.exe -command "Add-WindowsFeature SNMP-WMI-Provider"
4. Instalar RSAT-SNMP (opcional):
Aunque RSAT-SNMP no es un rol o característica estándar, el comando sugiere la instalación de
herramientas de administración remota (RSAT) para SNMP si están disponibles.
powershell.exe -command "Install-WindowsFeature RSAT-SNMP"
5. Verificar capacidades de OpenSSH:
SNMP no requiere OpenSSH, pero si necesitas verificar las capacidades de OpenSSH en tu sistema, puedes
usar este comando.
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
6. Instalar el servidor OpenSSH (opcional):
Este comando instala el servidor OpenSSH, que puede ser útil para la administración remota segura, aunque
no es necesario para SNMP.
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
7. Configurar reglas de firewall para SNMP:
SNMP utiliza los puertos UDP 161 y 162 para la comunicación. Es necesario permitir el tráfico entrante y
saliente en estos puertos en el firewall de Windows.
Permitir el tráfico entrante en el puerto UDP 161 (SNMP):
netsh advfirewall firewall add rule name="SNMP UDP Port 161 In" dir=in
action=allow protocol=UDP localport=161
Permitir el tráfico entrante en el puerto UDP 162 (SNMPTRAP):
netsh advfirewall firewall add rule name="SNMPTRAP UDP Port 162 In" dir=in
action=allow protocol=UDP localport=162
Permitir el tráfico saliente en el puerto UDP 161 (SNMP):
netsh advfirewall firewall add rule name="SNMP UDP Port 161 Out" dir=out
action=allow protocol=UDP localport=161
Permitir el tráfico saliente en el puerto UDP 162 (SNMPTRAP):
netsh advfirewall firewall add rule name="SNMPTRAP UDP Port 162 Out" dir=out
action=allow protocol=UDP localport=162
Resumen de los Comandos:
1. Instalación (opcional)
powershell.exe Install-WindowsFeature -name Telnet-Client
powershell.exe -command "Add-WindowsFeature SNMP-Service"
powershell.exe -command "Add-WindowsFeature SNMP-WMI-Provider"
powershell.exe -command "Install-WindowsFeature RSAT-SNMP"
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
netsh advfirewall firewall add rule name="SNMP UDP Port 161 In" dir=in
action=allow protocol=UDP localport=161
netsh advfirewall firewall add rule name="SNMPTRAP UDP Port 162 In" dir=in
action=allow protocol=UDP localport=162
netsh advfirewall firewall add rule name="SNMP UDP Port 161 Out" dir=out
action=allow protocol=UDP localport=161
netsh advfirewall firewall add rule name="SNMPTRAP UDP Port 162 Out" dir=out
action=allow protocol=UDP localport=162
Este procedimiento te permitirá habilitar SNMP en tu sistema Windows, lo que es útil para la monitorización y
gestión de red.