On Thu, Apr 30, 2009 at 9:20 AM, Steve Bertrand <st...@ibctech.ca> wrote: > Maxim Khitrov wrote: >> On Wed, Apr 29, 2009 at 8:35 PM, Brandon Weisz <li...@avioc.org> 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: >> >> r...@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 *.*
Doesn't work for me, the grep command removes *:* entry from the output: r...@gw1 [/root]# netstat -an Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) udp4 0 0 127.0.0.1.161 *.* udp4 0 0 *.* *.* <snip> The 127.0.0.1 entry is added with "begemotSnmpdPortStatus.127.0.0.1.161 = 1", but the other entry is always there. Turn the daemon on and off to verify that it's bsnmpd (or use sockstat). - Max _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"