initial import of net/ipband 0.6:

--
ipband is a pcap based IP traffic monitor. It tallies per-subnet traffic
and bandwidth usage and starts detailed logging if specified threshold
for the specific subnet is exceeded. If traffic has been high for a
certain period of time, the report for that subnet is generated which
can be appended to a file or e-mailed. When bandwidth usage drops below
the threshold, detailed logging for the subnet is stopped and memory is
freed.

This utility could be handy in a limited bandwidth WAN environment
(frame relay, ISDN etc. circuits) to pinpoint offending traffic source
if certain links become saturated to the point where legitimate packets
start getting dropped.

It also can be used to monitor internet connection when specifying the
range of local ip addresses (to avoid firing reports about non-local
networks).

WWW: http://ipband.sourceforge.net/

Submitted by Vincent Derrien <hyzzod@free.fr>
This commit is contained in:
lebel 2001-10-30 20:45:29 +00:00
parent 7960e6834a
commit 022c71cc89
9 changed files with 191 additions and 0 deletions

30
net/ipband/Makefile Normal file
View File

@ -0,0 +1,30 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/10/30 20:45:29 lebel Exp $
COMMENT= "ipband is a pcap based IP traffic monitor"
VERSION= 0.6
DISTNAME= ipband-${VERSION}
CATEGORIES= net
NEED_VERSION= 1.488
EXTRACT_SUFX= .tgz
HOMEPAGE= http://ipband.sourceforge.net/
MASTER_SITES= http://ipband.sourceforge.net/
MAINTAINER= Vincent Derrien <hyzzod@free.fr>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
NO_REGRESS= Yes
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ipband ${PREFIX}/bin/ipband
${INSTALL_DATA} ${WRKSRC}/ipband.1 ${PREFIX}/man/man1/ipband.1
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ipband/
${INSTALL_DATA} ${WRKSRC}/ipband.sample.conf \
${PREFIX}/share/examples/ipband/ipband.sample.conf
.include <bsd.port.mk>

3
net/ipband/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (ipband-0.6.tgz) = b2fe952c16384e301de9794096c69f51
RMD160 (ipband-0.6.tgz) = 5df8cbb16552cd990829475015554884f62d9813
SHA1 (ipband-0.6.tgz) = 3714b9d2772040dd1ced183bf05405c4bdf797be

View File

@ -0,0 +1,11 @@
--- ipband.sample.conf.orig Tue Oct 30 12:50:46 2001
+++ ipband.sample.conf Tue Oct 30 12:51:13 2001
@@ -7,7 +7,7 @@
#debug 0
#
# Interface to listen on
-#interface eth0
+#interface ne0
#
# Use promiscuous mode on the network interface? Default is yes.
#promisc yes

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-ipband_1,v 1.1.1.1 2001/10/30 20:45:29 lebel Exp $
--- ipband.1.orig Wed Oct 3 14:33:59 2001
+++ ipband.1 Tue Oct 30 15:31:39 2001
@@ -68,13 +68,13 @@ a partial ip address such as 192.168.1.0
Here is a list of arguments to \-L along with the corresponding range.
- COMMAND: \fBipband eth0 \-l 137.99.11\fR
+ COMMAND: \fBipband ne0 \-l 137.99.11\fR
RANGE: 137.99.11.0\-137.99.11.255
- COMMAND: \fBipband eth0 \-L 137.99.11:127.0.5/23\fR
+ COMMAND: \fBipband ne0 \-L 137.99.11:127.0.5/23\fR
RANGE: 137.99.11.0\-137.99.11.255,127.0.4.0\-127.0.5.255
- COMMAND: \fBipband eth0 \-L 127.1.5.17\-127.1.7.131\fR
+ COMMAND: \fBipband ne0 \-L 127.1.5.17\-127.1.7.131\fR
RANGE: 127.1.5.17\-127.1.7.131
@@ -178,7 +178,7 @@ Like \-L option, determines which range(
Specifies which subnets \fBipband\fR should work with and sets individual bandwidth thresholds for them \- one subnet option per line (subnet mask is set by \fImaskbits\fR option). This option is only available through a configuration file. Setting it limits data collection and reporting to the specified subnets.
.SH "EXAMPLES"
.TP
-.B ipband eth0 \-f "net 10.10.0.0/16" \-m 24 \-a 300 \-r 900
+.B ipband ne0 \-f "net 10.10.0.0/16" \-m 24 \-a 300 \-r 900
Will capture packets from/to ip addresses matching 10.10.0.0/255.255.0.0, tally traffic by the third octet,calculate bandwidth utilization every 5 minutes and report per host traffic every 15 minutes.

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-ipband_c,v 1.1.1.1 2001/10/30 20:45:29 lebel Exp $
--- ipband.c.orig Wed Oct 3 14:33:59 2001
+++ ipband.c Tue Oct 30 15:31:32 2001
@@ -457,7 +457,7 @@ void print_usage(void) {
printf(" with highest byte count. Default is no limit.\n");
printf(" -v - Print version and exit.\n");
printf("\nExample:\n");
- printf(" ipband eth0 -f \"net 10.10.0.0/16\" -m 24 -a 300 -r 900\n");
+ printf(" ipband ne0 -f \"net 10.10.0.0/16\" -m 24 -a 300 -r 900\n");
printf("\tWill capture packets from/to ip addresses matching\n");
printf("\t10.10.0.0/255.255.0.0, tally traffic by the third octet,\n");
printf("\tcalculate bandwidth utilization every 5 minutes and report\n");

21
net/ipband/pkg/DEINSTALL Normal file
View File

@ -0,0 +1,21 @@
# $OpenBSD: DEINSTALL,v 1.1.1.1 2001/10/30 20:45:29 lebel Exp $
# ipband deinstallation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${SYSCONFDIR}/ipband.conf
if [ -f ${CONFIG_FILE} ]; then
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| this step as root:"
echo "|"
echo "| rm -f $CONFIG_FILE"
echo "|"
echo "| Do not do this if you plan on re-installing $1"
echo "| at some future time."
echo "+---------------"
echo
fi

18
net/ipband/pkg/DESCR Normal file
View File

@ -0,0 +1,18 @@
ipband is a pcap based IP traffic monitor. It tallies per-subnet traffic
and bandwidth usage and starts detailed logging if specified threshold
for the specific subnet is exceeded. If traffic has been high for a
certain period of time, the report for that subnet is generated which
can be appended to a file or e-mailed. When bandwidth usage drops below
the threshold, detailed logging for the subnet is stopped and memory is
freed.
This utility could be handy in a limited bandwidth WAN environment
(frame relay, ISDN etc. circuits) to pinpoint offending traffic source
if certain links become saturated to the point where legitimate packets
start getting dropped.
It also can be used to monitor internet connection when specifying the
range of local ip addresses (to avoid firing reports about non-local
networks).
WWW: ${HOMEPAGE}

62
net/ipband/pkg/INSTALL Normal file
View File

@ -0,0 +1,62 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2001/10/30 20:45:29 lebel Exp $
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${SYSCONFDIR}/ipband.conf
SAMPLE_CONFIG_FILE=$PREFIX/share/examples/ipband/ipband.sample.conf
do_notice()
{
echo
echo "+---------------"
echo "| The existing $1 configuration file, $CONFIG_FILE,"
echo "| has NOT been changed. You may want to compare it to the"
echo "| current sample file, $SAMPLE_CONFIG_FILE,"
echo "| and update your configuration as needed."
echo "+---------------"
echo
}
do_install()
{
install -o root -g wheel -m 644 $SAMPLE_CONFIG_FILE $CONFIG_FILE
echo
echo "+---------------"
echo "| The $1 configuration file, $CONFIG_FILE,"
echo "| has been installed. Please view this file and change"
echo "| the configuration to meet your needs."
echo "+---------------"
echo
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
if [ -f $CONFIG_FILE ]; then
do_notice $1
else
do_install $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

5
net/ipband/pkg/PLIST Normal file
View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/10/30 20:45:29 lebel Exp $
bin/ipband
man/man1/ipband.1
share/examples/ipband/ipband.sample.conf
@dirrm share/examples/ipband