In case anyone is interested here is the finished script (in shellcmd
format):
<shellcmd>mkdir /usr/local/www/cgi</shellcmd>
<shellcmd>echo "#!/usr/local/bin/php" >
/usr/local/www/cgi/dump.php</shellcmd>
<shellcmd>echo "<?php echo \"<pre>\";" >>
/usr/local/www/cgi/dump.php</shellcmd>
<shellcmd>echo "\$ph = popen( \"/usr/bin/uptime; /sbin/ipfw
show\", \"r\" );" >> /usr/local/www/cgi/dump.php</shellcmd>
<shellcmd>echo "while (\$line = fgets( \$ph )) echo \$line;
pclose( \$ph );" >> /usr/local/www/cgi/dump.php</shellcmd>
<shellcmd>echo "echo \"</pre>\"; ?>" >>
/usr/local/www/cgi/dump.php</shellcmd>
<shellcmd>chmod 755 /usr/local/www/cgi/dump.php</shellcmd>
This creates a new web page called
http://whatever.your.monowall.is.called/cgi/dump.php which will return your
ipfw rules (and also the counters associated with each one.) This allows
another script (not on the monowall box) to feed MRTG with individual counts
based on queues, internal ip addresses or whatever else you feel like making
a rule for.
I hope someone else finds this useful.
John Voigt, President
Reston Wireless, LLC
High speed internet service
no smoke, no mirrors, no wires (tm)
http://www.reston-wireless.net/ |