System: Snmpd: configuring

(last edit: 2001-11-29)

Introduction

This article wil describe how to setup snmpd but it is REALY basic. You will be able to read the default mib and use it with e.g. mrtg.

Installing

Install the snmpd from '/usr/ports/net/net-snmpd'. Just a 'make' , 'make install' , 'make clean' will do. It will install a script in '/usr/local/etc/rc.d/' named 'snmpd.sh'. Use this script to start snmpd like this: /usr/local/etc/rc.d/snmdp.sh start This script ensures snmp is started when you boot your machine

Testing/Using

You can test your snmpd by using 'snmpwalk': snmpwalk 127.0.0.1 public The 'public' string is the community which you're accessing. This is something like a password. Because of the huge load of info snmpd produces it is wise to pipe the output to less.

Securing

If you want to secure snmp a bit more, then you have to change your community string. This can be done the hard, complex and fully featured way and the easy to go way. If you want to fully configure your community with different levels of access then hou have to read 'man snmpd.conf' . Ok here is the 'easy' way: Create/edit the file '/usr/local/share/snmp/snmpd.conf' and make sure the following line is the only one in the file: rocommunity [string] 127.0.0.1 Change [string] with the desired community string (thus your 'password'). This wil make a read only community only accessable from 127.0.0.1. You can make a read write community with 'rwcommunity' Snmpd uses this config file by default but you can enforce it by using the '-c configfile' option of snmpd.

Click here to go back to the index.