Just some geek notes for my future reference.
This how to will allow you to install a simple read only SNMP service on an Linux server.
1) Step one install snmpd
sudo apt-get update && sudo apt-get install snmpd
2) Edit the snmpd.conf file to allow a certain subnet to scan and set community name
sudo vi /etc/snmp/snmpd.conf
***Edit communtiy name security section to look like this****
# sec.name source community
#com2sec paranoid default public
com2sec readonly 0.0.0.0/24 public
#com2sec readwrite default private
3) Edit the defaults file to have snmpd bind to non localhost addresses.
sudo vi /etc/defaults/snmpd
****Edit to remove the reference to localhost*******
# snmpd options (use syslog, close stdin/out/err).
#SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1′
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid’
4) Kill and restart the snmpd process.
sudo /etc/init.d/snmpd restart
-or-
sudo pkill snmpd
5) Test the snmpd by walking from a host on an approved network.
snmpwalk -Os -c public
Leave a Reply