SNMP

Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment (eg. routers), computer equipment and even devices like UPSs.


SNMPD is the service running SNMP on a managed entity. SNMP comes in 3 versions. Version 1, the one we are going to use here is not secured, therefore we are going to make sure that only localhost is going to be able to access it.

People opening the service to the outside should make sure that trusted hosts can access the service either though the use of iptables or through the use of /etc/hosts.allow.

Tested on Ubuntu Desktop: 8.04, 8.10
Tested on Ubuntu Server: 8.04, 8.10

Installation

  • sudo apt-get install snmpd
  • edit file /etc/default/snmpd and make sure those values are set:
    • SNMPDRUN=yes
    • SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1′
      • If you want your server to listen on all interfaces, remove the 127.0.0.1 bit.
    • SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid’
  • Edit /etc/snmp/snmpd.conf and make sure that com2sec it only set to:
    • com2sec readonly 192.168.0.202 mycommunity
      • Replace the ip with that of your gathering server. Can be of the form: 1.1.1.1 or 1.1.0.0/16.
      • Replace the name ‘mycommunity’ with the name of your snmp community

2 thoughts on “SNMP

  1. Pingback: New Install of Ubuntu 9.04? | Brain Drop

  2. Pingback: Ubuntu 8.10 Install Items | Brain Drop

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>