From owner-freebsd-questions@FreeBSD.ORG Thu Apr 30 13:20:21 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBBA7106568A for ; Thu, 30 Apr 2009 13:20:21 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: from ibctech.ca (v6.ibctech.ca [IPv6:2607:f118::b6]) by mx1.freebsd.org (Postfix) with SMTP id 4D3DA8FC22 for ; Thu, 30 Apr 2009 13:20:21 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: (qmail 15879 invoked by uid 89); 30 Apr 2009 13:21:06 -0000 Received: from unknown (HELO ?IPv6:2607:f118::5?) (steve@ibctech.ca@2607:f118::5) by 2607:f118::b6 with ESMTPA; 30 Apr 2009 13:21:06 -0000 Message-ID: <49F9A58D.7050107@ibctech.ca> Date: Thu, 30 Apr 2009 09:20:13 -0400 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Maxim Khitrov References: <26ddd1750904270928g106c8d7dg72b6b3a09ffc0afa@mail.gmail.com> <26ddd1750904291049s22eb912dg81a105e5f783f44@mail.gmail.com> <49F8F255.6080508@avioc.org> <26ddd1750904300602g31c8d135lab0200f37ff6d4a2@mail.gmail.com> In-Reply-To: <26ddd1750904300602g31c8d135lab0200f37ff6d4a2@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Brandon Weisz , freebsd-questions@freebsd.org, Anton Yuzhaninov Subject: Re: bsnmpd vs net-snmp 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: Thu, 30 Apr 2009 13:20:23 -0000 Maxim Khitrov wrote: > On Wed, Apr 29, 2009 at 8:35 PM, Brandon Weisz wrote: >> I cant speak to the documentation, but this seems to limit it to listening >> on a single address: >> >> Example.. >> >> # open standard SNMP ports >> begemotSnmpdPortStatus.192.168.2.254.161 = 1 > > Thanks, but I tried this already. It causes bsnmpd to listen on the > given IP as well, but doesn't remove the *:* entry: > > root@gw1 [/root]# sockstat -l4 > USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS > root bsnmpd 61251 4 udp4 *:* *:* > root bsnmpd 61251 5 udp4 127.0.0.1:161 *:* > > The author suggested using "begemotSnmpdPortTable.0.0.0.0.161 = 1" and > change the IP there, but this causes the following error: > > Apr 30 08:59:59 gw1 snmpd[78798]: unknown variable > Apr 30 08:59:59 gw1 snmpd[78798]: in file /usr/local/etc/bsnmpd.conf line 20 > Apr 30 08:59:59 gw1 snmpd[78798]: error in config file Here's how I limit to a single address: host := 208.70.106.1 # open standard SNMP ports begemotSnmpdPortStatus.[$(host)].161 = 1 begemotSnmpdPortStatus.127.0.0.1.161 = 1 # netstat -na | grep 161 udp4 0 0 208.70.106.1.161 *.* udp4 0 0 127.0.0.1.161 *.* Steve