configuring snmpd when setting up jailed environment

Don Munyak don.munyak at gmail.com
Fri Apr 6 12:51:49 UTC 2007


I am trying to make snmpd listen on a specific address for the JAIL
HOST(aka physical server) and each jailed environment (aka JAIL).

The server is server configured using the ezjail framework.

As I read "man (8) snmpd", I should be able to do this.

I am trying to make the JAIL HOST listen on udp:161 192.168.222.90
and a JAIL to listen on udp:161 192.168.222.91

obviously, each JAIL alias IP would be distinct for each jailed environment.

I have edited JAIL HOST /usr/local/etc/snmp/snmpd.conf to include
    "agentaddress udp:161 192.168.2222.90"

Where do I profile this?
How do I make this work?
What am I doing wrong?

I am humbly asking for assistance :)

Thanks
Don
===============
Section: Net-SNMP (8)
SNMPD

SYNOPSIS
snmpd [OPTIONS] [LISTENING ADDRESSES]

-x ADDRESS
    Listens for AgentX connections on the specified address rather
than the default "/var/agentx/master". The address can either be a
Unix domain socket path, or the address of a network interface. The
format is the same as the format of listening addresses described
below.
==============

==== some of my notes ===

JAIL Host hier, separate partition for jails
/usr/jails

basejail & newjail
/usr/jails/basejail
/usr/jails/newjails

I did not modify the ezjail.conf file

>From JAIL HOST
# mount_procfs proc  /usr/jails/web/proc

>From within the JAIL
I installed /usr/ports/net-mgmt/net-snmp
# make
# make install clean

mkdir /snmp in /usr/local/etc
create snmpd.conf file
# cp /usr/local/share/snmp/snmpd.conf.example /usr/local/etc/snmp/snmpd.conf

Made minial changes to snmpd.conf in JAIL Host and JAIL.
# sec.name  source          community
# com2sec   local      localhost       public
com2sec     local 192.168.222.91 public
com2sec     mynetwork 192.168.222.0/24      public

Added to JAIL rc.conf and JAIL HOST rc.conf
# vi /usr/jails/web/etc/rc.conf
snmpd_enable="YES"
snmpd_flags="-a"
snmpd_pidfile="/var/run/snmpd.pid"

restart the JAIL

>From JAIL
#  snmpwalk -c public -u com2sec -v 1 web system
This does output allot of expected snmp data EXCEPT that it is listing
the data for the JAIL HOST, not the JAIL.

#  less /var/log/snmpd.log
init_kmem: kvm_openfiles failed: /dev/mem: No such file or directory


More information about the freebsd-questions mailing list