Tools

Account Tools

Search Tools


Enabling SNMP on Centos / Redhat

To configure snmp on Redhat/centos, you first need to install the snmpd package using the command :

copy
yum install net-snmp

Then edit the configuration file :

copy
nano /etc/snmp/snmpd.conf

add the line :

copy
rocommunity public

Next, restart the SNMP service by typing :

copy
service snmpd restart

If the service does not respond to the SNMP request and you get an error of this type, in your log file : /var/log/messages

Dec 8 07:13:47 era snmpd[19465]: Connection from UDP: [10.10.0.149]:56275->[10.15.0.1]:161 REFUSED

Simply edit the host.allow file

copy
nano /etc/hosts.allow

file and add a line like this : snmpd: <votre ip>for example :

copy
snmpd: 10.10.0.149

Next, you need to restart the SNMP service:

copy
service snmpd restart
en/snmp/snmp_centos_redhat.txt · Last modified: 2023/11/09 18:07 by q.george