summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-09-29 02:16:00 +0000
committerMike Frysinger <vapier@gentoo.org>2003-09-29 02:16:00 +0000
commit39dd6099ef248f1cd26c892090fbc04ab3566c06 (patch)
treeb154fec10527a75d572aa35d98844eba2600785d /net-analyzer
parentmsterret -> mr_bones_ (diff)
downloadgentoo-2-39dd6099ef248f1cd26c892090fbc04ab3566c06.tar.gz
gentoo-2-39dd6099ef248f1cd26c892090fbc04ab3566c06.tar.bz2
gentoo-2-39dd6099ef248f1cd26c892090fbc04ab3566c06.zip
initial ebuild #19246
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ipac-ng/ChangeLog8
-rw-r--r--net-analyzer/ipac-ng/files/digest-ipac-ng-1.27_p11
-rw-r--r--net-analyzer/ipac-ng/files/ipac-ng.cron8
-rw-r--r--net-analyzer/ipac-ng/files/ipac-ng.rc36
-rw-r--r--net-analyzer/ipac-ng/files/ipac.conf56
-rw-r--r--net-analyzer/ipac-ng/ipac-ng-1.27_p1.ebuild65
6 files changed, 174 insertions, 0 deletions
diff --git a/net-analyzer/ipac-ng/ChangeLog b/net-analyzer/ipac-ng/ChangeLog
new file mode 100644
index 000000000000..554bfbbec8c2
--- /dev/null
+++ b/net-analyzer/ipac-ng/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for net-analyzers/ipac-ng
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipac-ng/ChangeLog,v 1.1 2003/09/29 02:16:00 vapier Exp $
+
+*ipac-ng-1.27_p1 (28 Sep 2002)
+
+ 28 Sep 2002; Mike Frysinger <vapier@gentoo.org> :
+ Initial ebuild. Ebuild made by Philipp Lopaur <fips@fips.at> #19246.
diff --git a/net-analyzer/ipac-ng/files/digest-ipac-ng-1.27_p1 b/net-analyzer/ipac-ng/files/digest-ipac-ng-1.27_p1
new file mode 100644
index 000000000000..6b0ba9181e50
--- /dev/null
+++ b/net-analyzer/ipac-ng/files/digest-ipac-ng-1.27_p1
@@ -0,0 +1 @@
+MD5 9ac8ded2b1690605017d41da04a7d90f ipac-ng-1.27pl1.tar.bz2 194433
diff --git a/net-analyzer/ipac-ng/files/ipac-ng.cron b/net-analyzer/ipac-ng/files/ipac-ng.cron
new file mode 100644
index 000000000000..d86b859ab26b
--- /dev/null
+++ b/net-analyzer/ipac-ng/files/ipac-ng.cron
@@ -0,0 +1,8 @@
+#!/bin/sh
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipac-ng/files/ipac-ng.cron,v 1.1 2003/09/29 02:16:00 vapier Exp $
+
+FI=/usr/sbin/fetchipac
+
+if [ -x ${FI} ] && [ -f /var/run/ipac.rules ]; then
+ ${FI}
+fi
diff --git a/net-analyzer/ipac-ng/files/ipac-ng.rc b/net-analyzer/ipac-ng/files/ipac-ng.rc
new file mode 100644
index 000000000000..00488db75b1a
--- /dev/null
+++ b/net-analyzer/ipac-ng/files/ipac-ng.rc
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipac-ng/files/ipac-ng.rc,v 1.1 2003/09/29 02:16:00 vapier Exp $
+
+depend() {
+ need net logger
+}
+
+start() {
+ ebegin "Setting up ipac-ng iptables chains"
+ /usr/sbin/fetchipac -S
+ /usr/sbin/fetchipac
+ eend $?
+}
+
+stop() {
+ ## fetch so we dont loose data
+ /usr/sbin/fetchipac
+
+ IPT=/sbin/iptables
+ ebegin "Removing ipac-ng iptables settings"
+
+ ${IPT} -D INPUT -s 0/0 -d 0/0 -j ipac_in
+ ${IPT} -D OUTPUT -s 0/0 -d 0/0 -j ipac_out
+ ${IPT} -D FORWARD -s 0/0 -d 0/0 -j ipac_in
+ ${IPT} -D FORWARD -s 0/0 -d 0/0 -j ipac_out
+ ${IPT} -F ipac_in
+ ${IPT} -F ipac_out
+ ${IPT} -X ipac_in
+ ${IPT} -X ipac_out
+
+ rm -f /var/run/ipac.rules /var/run/ipac.status
+
+ eend $?
+}
diff --git a/net-analyzer/ipac-ng/files/ipac.conf b/net-analyzer/ipac-ng/files/ipac.conf
new file mode 100644
index 000000000000..9428b8160db5
--- /dev/null
+++ b/net-analyzer/ipac-ng/files/ipac.conf
@@ -0,0 +1,56 @@
+# $Id: ipac.conf,v 1.1 2003/09/29 02:16:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipac-ng/files/ipac.conf,v 1.1 2003/09/29 02:16:00 vapier Exp $
+
+# Example config file with accounting rules
+# Install as /etc/ipac-ng/ipac.conf
+#
+# Format:
+# Name of rule|direction|interface|protocol|source|destination
+#
+# where
+# Name of rule Any string to identify this rule
+# direction in | out
+# interface ip number or interface name, '+' means all interfaces
+# protocol tcp | udp | icmp | all
+# source \
+# destination both as described in ipfwadm(8), or empty
+
+# target accept, deny, reject or none of that
+#
+# incoming:
+
+incoming all |in|eth+|all||
+incoming TCP |in|eth+|tcp||
+incoming UDP |in|eth+|udp||
+incoming ICMP |in|eth+|icmp||
+incoming local SSH |in|eth+|tcp||0/0 ssh
+
+#incoming smtp|in||tcp|0/0 smtp|
+#incoming nntp|in||tcp|0/0 nntp|
+#incoming samba|in|eth+|tcp||0/0 137 138 139
+#incoming samba|in|eth+|udp||0/0 137 138 139
+#incoming samba|in|eth+|tcp|0/0 137 138 139|
+#incoming samba|in|eth+|udp|0/0 137 138 139|
+#incoming http|in||tcp|0/0 http https 81 82 83 8080|
+#incoming ftp |in||tcp|0/0 ftp ftp-data|
+#incoming dns |in||udp|0/0 domain|
+
+#
+# Outgoing:
+outgoing all |out|eth+|all||
+outgoing TCP |out|eth+|tcp||
+outgoing UDP |out|eth+|udp||
+outgoing ICMP |out|eth+|icmp||
+outgoing local Webserver |out|eth+|tcp|0/0 http https|
+outgoing local SSH |out|eth+|tcp|0/0 ssh|
+
+#outgoing smtp|out||tcp||0/0 smtp
+#outgoing nntp|out||tcp||0/0 nntp
+#outgoing samba|out|eth+|tcp|0/0 137 138 139|
+#outgoing samba|out|eth+|udp|0/0 137 138 139|
+#outgoing samba|out|eth+|tcp||0/0 137 138 139
+#outgoing samba|out|eth+|udp||0/0 137 138 139
+#outgoing http|out||tcp||0/0 http https 81 82 83 8080
+#outgoing ftp |out||tcp||0/0 ftp ftp-data
+#outgoing dns |out||udp||0/0 domain
+#
diff --git a/net-analyzer/ipac-ng/ipac-ng-1.27_p1.ebuild b/net-analyzer/ipac-ng/ipac-ng-1.27_p1.ebuild
new file mode 100644
index 000000000000..ced35c965eca
--- /dev/null
+++ b/net-analyzer/ipac-ng/ipac-ng-1.27_p1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipac-ng/ipac-ng-1.27_p1.ebuild,v 1.1 2003/09/29 02:16:00 vapier Exp $
+
+DESCRIPTION="ipac-ng an ip accounting suite for 2.4 series kernels with PNG image output like mrtg"
+HOMEPAGE="http://sourceforge.net/projects/ipac-ng/"
+SRC_URI="mirror://sourceforge/ipac-ng/${P/_p/pl}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="gd"
+
+DEPEND="sys-devel/bison
+ sys-devel/flex
+ dev-lang/perl
+ sys-libs/gdbm
+ gd? ( dev-perl/GD )
+ sys-devel/flex
+ virtual/glibc"
+RDEPEND="net-firewall/iptables
+ virtual/cron
+ dev-lang/perl
+ sys-libs/gdbm
+ gd? ( dev-perl/GD )
+ virtual/glibc"
+
+S=${WORKDIR}/${P/_p*}
+
+src_compile() {
+ econf \
+ --enable-default-storage=gdbm \
+ --enable-default-agent=iptables \
+ || die "./configure failed"
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failed"
+
+ dodir /var/lib/ipac
+
+ insinto /etc/ipac-ng
+ doins ${FILESDIR}/ipac.conf
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/ipac-ng.rc ipac-ng
+
+ exeinto /etc/cron.hourly
+ newexe ${FILESDIR}/ipac-ng.cron ipac-ng
+
+ dodoc COPYING README* TODO UPDATE* CHANGES
+}
+
+pkg_postinst() {
+ einfo "W A R N I N G !"
+ einfo "do not use \"/etc/init.d/iptables save\" when ipac-ng is running!"
+ einfo "this WILL cause problems!"
+ einfo "ipac-ng should be started AFTER iptables and shut down BEFORE iptables"
+ einfo "the accounting database is at /var/lib/ipac"
+ einfo "use /usr/sbin/ipacsum to get your ip acounting data"
+ einfo "use /usr/sbin/fetchipac to update the accounting at any time"
+ einfo "fetchipac is run by cron every hour by /etc/cron.daily/ipac-ng"
+ einfo "after you changed ipac.conf you have to run \"fetchipac -S\" or"
+ einfo "stop/start the service so your iptables gets updated"
+}