Simple snmpd Install on Linux.

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: