howtos/Linux/snmp instalacion y configur...

23 lines
903 B
Plaintext

----INSTALAMOS LOS PAQUETES
apt-get install snmpd snmp libsnmp-dev
----PARAMOS EL SERVICIO POR SI ESTUVIESE ARRANCADO
systemctl stop snmpd
----CONFIGURAMOS EL SNMP V3 CON UNO DE ESTOS DOS COMANDOS, DEPENDIENDO DE LA VERSION DE DEBIAN/UBUNTU (PRUEBA Y ERROR)
net-snmp-create-v3-user -ro -A [PASSPHRASE] -a SHA -X [PASSPHRASE] -x AES snmpadmin
net-snmp-config --create-snmpv3-user -ro -A [PASSPHRASE] -X [PASSPHRASE] -a SHA -x AES snmpadmin
----CONFIGURAMOS QUE ESCUCHE EN TODAS LAS IPS
Editar el fichero /etc/snmp/snmpd.conf y dejar estas lineas como se ve:
#agentAddress udp:127.0.0.1:161
# Listen for connections on all interfaces (both IPv4 *and* IPv6)
agentAddress udp:161,udp6:[::1]:161
----ARRANCAMOS EL SERVICIO
systemctl start snmpd
----COMPROBAMOS QUE FUNCIONE
snmpwalk -v3 -l authPriv -u snmpadmin -a SHA -A [PASSPHRASE] -x AES -X [PASSPHRASE] localhost | head