On Sun, May 05, 2002 at 08:43:57PM -0500, Ronneil Camara wrote:
> 
> That's good. Anyways, were can I find a HOWTO on integrating ipf and mrtg?
> 
> Thanks.

        Don't think there is a HOWTO, cause you didn't write it yet :-)

        Well, I run net-snmp on the firewall, and query it from another
host, also syslog over the net also..  There are other resources
for information about mrtg and snmp. But the ipf specific modification 
I do are

        1)  run snmpd as user snmp in group kmem

        2) change the ownership/perms of /dev/ipl /dev/ipnat /dev/ipstate
           to

crw-------  1 root  wheel   79,   3 Jan 29 12:09 /dev/ipauth
crw-r-----  1 root  kmem    79,   0 Jan 29 12:09 /dev/ipl
crw-r-----  1 root  kmem    79,   1 Jan 29 12:09 /dev/ipnat
crw-r-----  1 root  kmem    79,   2 Jan 29 12:09 /dev/ipstate

        This is a minor weakining of the device security and is preferable
to running snmpd as root.

        Also I use this simple script and throw the output into
the snmp MIB using net-snmp's 'exec' capablity.


#!/bin/sh
# fw.sh

ipfstat|head -3|awk '{print $4}'
ipfstat -s|tail -n 11|awk '{print $1}'
ipnat -s|grep inuse|awk '{print $2}'



        Here is snmpd.conf


# snmpd.conf

rocommunity some_secret

exec .1.3.6.1.4.1.2021.61 FWSTAT /usr/local/scripts/fw.sh
exec .1.3.6.1.4.1.2021.62 NETSTAT /usr/local/scripts/netstat.sh



        -steve

Reply via email to