From owner-freebsd-questions@FreeBSD.ORG Fri Apr 6 12:51:49 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A3B716A404 for ; Fri, 6 Apr 2007 12:51:49 +0000 (UTC) (envelope-from don.munyak@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 494A513C458 for ; Fri, 6 Apr 2007 12:51:49 +0000 (UTC) (envelope-from don.munyak@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so1020476ana for ; Fri, 06 Apr 2007 05:51:47 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=U9JiYd6I55InpOHS3wsSmoV7ND4hWBpbkkt0RU31oVqiqWTnJKXIyvYjLu2LLuMmeeuMd9YKvaq9L1JZJBsYi3m5xj0CPmf5iIlnku48WonK5sHL9Te7UtLDBi1R5e+/ocvJgV+igwjgiKzHhwG6kYjzPchDIpK0cUkh5YDHOEs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=SX3wBNaFYWIlyBBx2Qcf84T1QNXfcih7lo7sKjJ+wYrFL84K4iuihQf9mDKjTsZKBTbACDhonI+XAOHjaMClRxUE7BQQ5o4OMrBdvkWM2UZ2GcmCrLbZC8pEWWE8bqcPjk2koHD46HkUlYTg8ALv8U5U/l4GIbljjoxxHpXK2N4= Received: by 10.100.8.18 with SMTP id 18mr2065267anh.1175863907708; Fri, 06 Apr 2007 05:51:47 -0700 (PDT) Received: by 10.100.10.13 with HTTP; Fri, 6 Apr 2007 05:51:47 -0700 (PDT) Message-ID: <6207f7d90704060551pe29f219s21f53c4bc950ea2a@mail.gmail.com> Date: Fri, 6 Apr 2007 08:51:47 -0400 From: "Don Munyak" To: "FreeBSD Questions" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: configuring snmpd when setting up jailed environment X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2007 12:51:49 -0000 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