[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] Requesting help configuring snmpd from within ezjail.



======man page=========

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.

======man page=========

Where do I profile this.

I have tried in /usr/local/etc/snmp/snmpd.conf as
agentaddress udp:161 192.168.2222.91

matter-of-fact, I've spent all day trying and searching the net, for
some direction to configuring snmpd for jails and jail host.

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

Thanks

==== 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

# 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
# web# 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