tomclegg.net


Diary
Examples
    256-router
    adzap
    apache-double-reverse
    cacti-adodb-php4
    debian-quota
    diskonmodule
    dollarsperbyte
    dynip
    ezmlm-linux
    fbsdhabits
    freebsdclone
    macbook-quantal-sound
    maildirpop3d-awfulhak
    mandy
    md
    mrtg
  >net-snmp<
    nodefaultroute
    oracle9i
    oracle9i-bsd5
    oracle9i-client
    oracle9i-nat
    php-cgi
    php-commandline
    php-image
    php-kics
    php-mini_httpd
    pinouts
    pizzaperdollar
    plesk-symlink-php
    pxe
    qmail-linux
    qmail-qfilter
    racoon-sonicwall
    redundant-vpn
    rewriterule
    seahorse-workaround
    setting-locale-failed
    smalldog
    snmpv3-cacti
    spamassassin
    squid-tproxy
    supfile
    suse73
    svc-nmbd
    svc-smbd
    svc-smtpd
    switch-virtualbox-virsh
    toyotastereo
    vm
    vn-file
    wmp-invalid
    xcode-remote-install
    xen-eth0-renamed
    xen-monowall
    xen3-ubuntu-dapper
    zz-update-grub-fail
Hire Tom
Mostly Mozart
Patches
School
Scrapbook
Software
Telephones




colocation
comments
davidireland
edsgranola
faq
funsites
goodlooking
goodmovies
google-earth-saucy-amd64
houserules
liberating
resume
resume2
scratch
shopping
snacks
todo
university
warisbogus

simple snmp
Posted April 4, 2007

Install the net-snmp software.

cd /usr/ports/net-mgmt/net-snmp
make install

Add firewall rules to prevent anyone other than you from communicating with your snmp daemon. If you're running mrtg at 1.2.3.4:

ipfw add 11 deny udp from me snmp to not 1.2.3.4
ipfw add 11 deny udp from not 1.2.3.4 to me snmp
ipfw add 11 deny udp from any to me smux

Create a configuration file in /usr/local/etc/snmpd.conf.

rocommunity public

Enable snmpd in /etc/rc.conf.

snmpd_enable="YES"
snmpd_conffile="/usr/local/etc/snmpd.conf"

Start snmpd.

/usr/local/etc/rc.d/snmpd.sh start

Make sure it's running.

tail /var/log/snmpd.log

netstat -an|grep '*.161'