Run the following commands in the terminal:
- Update all packages: sudo yum check-update
- Install SNMP: yum -y install net-snmp
Next we need to configure multiple entries in the snmpd.conf, there is a manual page located here (link to http://net-snmp.sourceforge.net/docs/man/snmpd.conf.html) which contains information for additional configuration options.
- (Optional) Install Nano: sudo yum -y install nano
- Edit snmpd.conf with text editor of your choice, we will be using nano: sudo nano /etc/snmp/snmpd.conf
- Configure com2sec: com2sec ESUser 127.0.0.1 public
-Change "public" to your community name
- com2sec ESUser 0.0.0.0/0 public
-Change "public" to your community name
-Change the IP to your server or network
- Configure group: group ESGroup v1 ESUser
- group ESGroup v2c ESUser
- Configure view: view all included .1
- Configure access: access ESGroup "" any noauth exact all none none
- Restart the SNMPD service: sudo systemctl restart snmpd
- Configure SNMPD to start on boot: chkconfig snmpd on
Example Config:
com2sec ESUser 127.0.0.1 NixKB
com2sec ESUser 0.0.0.0/0 NixKB
group ESGroup v1 ESUser
group ESGroup v2c ESUser
view all included .1
access ESGroup "" any noauth exact all none none
Note: It is recommend to setup firewall rules in order to allow only authorized IP ranges to connect to the SNMP daemon.