update to NfSen 1.3.6p1, to go with updated nfdump

This commit is contained in:
sthen 2013-05-03 01:17:10 +00:00
parent 88979d1695
commit 8dc6493640
12 changed files with 88 additions and 108 deletions

View File

@ -1,15 +1,10 @@
# $OpenBSD: Makefile,v 1.20 2013/03/11 11:35:50 espie Exp $
# $OpenBSD: Makefile,v 1.21 2013/05/03 01:17:10 sthen Exp $
MULTI_PACKAGES= -main -web
COMMENT-main= web-based front end for the nfdump netflow tools
COMMENT-web= html/php parts for nfsen
COMMENT= web-based front end for the nfdump netflow tools
V= 1.3.5
REVISION-main= 8
REVISION-web= 2
V= 1.3.6p1
DISTNAME= nfsen-$V
PKGNAME-main= ${DISTNAME}
PKGNAME-web= nfsen-web-$V
PKGNAME= ${DISTNAME:S/p/pl/}
CATEGORIES= net www
HOMEPAGE= http://nfsen.sourceforge.net/
@ -21,18 +16,15 @@ PERMIT_PACKAGE_CDROM= Yes
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nfsen/}
MODULES= perl lang/php
COMMON_DEPENDS= net/rrdtool,-perl \
RUN_DEPENDS= net/rrdtool,-perl \
mail/p5-Mail-Tools \
net/nfdump,-nfprofile \
net/nfdump>=1.6.3
BUILD_DEPENDS= ${COMMON_DEPENDS}
RUN_DEPENDS-main= ${COMMON_DEPENDS} \
nfsen-web-$V:net/nfsen,-web
net/nfdump>=1.6.9
BUILD_DEPENDS= ${RUN_DEPENDS}
NO_BUILD= Yes
NO_TEST= Yes
PREFIX-web= /var/www
WWWDIR= ${WRKINST}${PREFIX-web}/htdocs
WWWDIR= ${WRKINST}/var/www/htdocs
PKG_ARCH= *
pre-configure:
@ -57,6 +49,7 @@ do-install:
${INSTALL_SCRIPT} ${WRKSRC}/installer-items/* ${PREFIX}/${P5SITE}/NfSen/installer-items
${INSTALL_SCRIPT} ${WRKSRC}/contrib/PortTracker/PortTracker.pm ${PREFIX}/lib/nfsen/plugins/
${INSTALL_SCRIPT} ${WRKSRC}/contrib/PortTracker/PortTracker.php ${WWWDIR}/nfsen/plugins/
-mv ${WWWDIR}/nfsen/conf.php ${WWWDIR}/nfsen/conf.php.dist
find ${WRKINST} -name '*.orig' -print0 | xargs -0r rm
chown -R ${SHAREOWN}:${SHAREGRP} ${WRKINST}/var/www/htdocs/nfsen
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/bin ${PREFIX}/lib ${PREFIX}/libdata

View File

@ -1,5 +1,2 @@
MD5 (nfsen-1.3.5.tar.gz) = iX8hzSiFLzHF/4fY6a96SA==
RMD160 (nfsen-1.3.5.tar.gz) = 6zQxY5XG8L8ic+G/TIgSIgVuJm8=
SHA1 (nfsen-1.3.5.tar.gz) = WRcjQB1DsaQHH/xabkK7nd0u8js=
SHA256 (nfsen-1.3.5.tar.gz) = sq/XAIGML5EYLSlwoXWfHAqMKDWZBybxX2lVFPALHkM=
SIZE (nfsen-1.3.5.tar.gz) = 221348
SHA256 (nfsen-1.3.6p1.tar.gz) = gQ6VVGM4YidW3rkZ1+5sOXIbyYc7t13H7EEewLh+EmU=
SIZE (nfsen-1.3.6p1.tar.gz) = 220620

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-etc_nfsen-dist_conf,v 1.2 2011/03/24 23:04:00 sthen Exp $
--- etc/nfsen-dist.conf.orig Thu Sep 9 06:46:23 2010
+++ etc/nfsen-dist.conf Thu Mar 17 01:56:44 2011
$OpenBSD: patch-etc_nfsen-dist_conf,v 1.3 2013/05/03 01:17:10 sthen Exp $
--- etc/nfsen-dist.conf.orig Sat Jan 14 10:13:53 2012
+++ etc/nfsen-dist.conf Fri May 3 01:34:14 2013
@@ -8,6 +8,10 @@
# Set all the values to fit your NfSen setup and run the 'install.pl'
# script from the nfsen distribution directory.
@ -89,7 +89,7 @@ $OpenBSD: patch-etc_nfsen-dist_conf,v 1.2 2011/03/24 23:04:00 sthen Exp $
# user and group of the web server process
# All netflow processing will be done with this user
@@ -210,6 +214,7 @@ $syslog_facility = 'local3';
@@ -213,6 +217,7 @@ $syslog_facility = 'local3';
@plugins = (
# profile # module
# [ '*', 'demoplugin' ],

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-html_nfsen_php,v 1.1 2011/03/24 23:04:00 sthen Exp $
--- html/nfsen.php.orig Thu Mar 17 02:12:31 2011
+++ html/nfsen.php Thu Mar 17 02:12:50 2011
@@ -696,7 +696,7 @@ switch ($label) {
$OpenBSD: patch-html_nfsen_php,v 1.2 2013/05/03 01:17:10 sthen Exp $
--- html/nfsen.php.orig Mon Jan 23 16:36:02 2012
+++ html/nfsen.php Fri May 3 01:34:14 2013
@@ -701,7 +701,7 @@ switch ($label) {
}
if ( count($plugins) > 0 ) {
$plugin_name = $plugins[ $_SESSION['sub_tab'] ];

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-install_pl,v 1.3 2011/03/24 23:04:00 sthen Exp $
--- install.pl.orig Thu Sep 9 06:56:05 2010
+++ install.pl Thu Mar 17 01:16:02 2011
@@ -162,14 +162,14 @@ sub VerifyUser {
$OpenBSD: patch-install_pl,v 1.4 2013/05/03 01:17:10 sthen Exp $
--- install.pl.orig Mon Jan 23 16:36:02 2012
+++ install.pl Fri May 3 01:34:14 2013
@@ -165,14 +165,14 @@ sub VerifyUser {
if ( !defined $gid_name ) {
die "Group '$user_gid' not found on this system\n";
}
@ -22,7 +22,7 @@ $OpenBSD: patch-install_pl,v 1.3 2011/03/24 23:04:00 sthen Exp $
} # End of VerifyUser
@@ -585,11 +585,11 @@ sub CopyAllFiles {
@@ -592,11 +592,11 @@ sub CopyAllFiles {
CopyRecursive::dircopy("plugins/backend", "$NfConf::INSTPREFIX$NfConf::BACKEND_PLUGINDIR");
CopyRecursive::dircopy("plugins/frontend", "$NfConf::INSTPREFIX$NfConf::FRONTEND_PLUGINDIR");
@ -36,7 +36,7 @@ $OpenBSD: patch-install_pl,v 1.3 2011/03/24 23:04:00 sthen Exp $
}
print "\n";
@@ -608,7 +608,7 @@ sub Cleanup {
@@ -615,7 +615,7 @@ sub Cleanup {
);
foreach my $file ( @OldFiles ) {
@ -45,7 +45,7 @@ $OpenBSD: patch-install_pl,v 1.3 2011/03/24 23:04:00 sthen Exp $
}
} # End of Cleanup
@@ -622,8 +622,13 @@ sub Cleanup {
@@ -629,8 +629,13 @@ sub Cleanup {
$| = 1;
my $ConfigFile = shift @ARGV;
@ -60,7 +60,7 @@ $OpenBSD: patch-install_pl,v 1.3 2011/03/24 23:04:00 sthen Exp $
# Load the required NfSen modules
unshift @INC, "libexec";
print "Check for required Perl modules: ";
@@ -693,7 +698,8 @@ print "Version: $nfsen_version: $VERSION\n\n";
@@ -701,7 +706,8 @@ print "Version: $nfsen_version: $VERSION\n\n";
# Get Perl
# Put this into a NfConf variable, so we can use the standard Patch Procedure
@ -70,7 +70,7 @@ $OpenBSD: patch-install_pl,v 1.3 2011/03/24 23:04:00 sthen Exp $
$NfConf::INSTPREFIX = $ENV{'INSTPREFIX'};
if ( defined $NfConf::INSTPREFIX ) {
if ( ! $NfConf::INSTPREFIX =~ /\/$/ ) {
@@ -707,7 +713,10 @@ if ( defined $NfConf::INSTPREFIX ) {
@@ -715,7 +721,10 @@ if ( defined $NfConf::INSTPREFIX ) {
my ($nfsen_uid, $www_gid ) = VerifyConfig();
my $nfsen_run = 0;
@ -81,7 +81,7 @@ $OpenBSD: patch-install_pl,v 1.3 2011/03/24 23:04:00 sthen Exp $
# test for two files of old layout
my $need_rrdlayout_upgrade = -f "$NfConf::PROFILESTATDIR/live/flows.rrd" && -f "$NfConf::PROFILESTATDIR/live/packets_other.rrd";
@@ -757,10 +766,14 @@ if ( -f "$NfConf::PIDDIR/$pid_name" ) {
@@ -765,10 +774,14 @@ if ( -f "$NfConf::PIDDIR/$pid_name" ) {
}
}
}
@ -96,7 +96,7 @@ $OpenBSD: patch-install_pl,v 1.3 2011/03/24 23:04:00 sthen Exp $
Cleanup();
SetupEnv($nfsen_uid, $www_gid);
@@ -801,14 +814,17 @@ $$$hints{'version'} = $nfsen_version;
@@ -809,14 +822,17 @@ $$$hints{'version'} = $nfsen_version;
$$$hints{'installed'} = time();
NfSen::StoreHints();
chown $nfsen_uid, $www_gid, "$NfConf::INSTPREFIX$NfConf::PROFILESTATDIR/hints" || die "Can't chown hints db: $!\n";

View File

@ -1,17 +0,0 @@
NfSen is a graphical web based front end for the nfdump netflow
tools, allowing you to:
* Display your netflow data:
Flows, Packets and Bytes using RRD (Round Robin Database).
* Easily navigate through the netflow data.
* Process the netflow data within the specified time span.
* Create history as well as continuous profiles.
* Set alerts, based on various conditions.
* Write your own plugins to process netflow data on a regular interval.
Different tasks need different interfaces to your netflow data.
NfSen allows you to keep all the convenient advantages of the command
line using nfdump directly and gives you also a graphical overview
over your netflow data.
This package contains the website parts (html, PHP, etc.)

View File

@ -1,9 +1,57 @@
@comment $OpenBSD: PLIST-web,v 1.2 2011/03/24 23:04:00 sthen Exp $
@comment $OpenBSD: PLIST,v 1.1 2013/05/03 01:17:10 sthen Exp $
@pkgpath net/nfsen,-main
@pkgpath net/nfsen,-web
@conflict nfsen-web-*
@extraunexec rm -rf /var/db/nfsen/ports-db/*
bin/RebuildHierarchy.pl
bin/install-nfsen.pl
bin/nfsen
bin/nfsend
bin/testPlugin
lib/nfsen/
lib/nfsen/plugins/
lib/nfsen/plugins/PortTracker.pm
lib/nfsen/plugins/demoplugin.pm
lib/nfsen/plugins/smily.jpg
${P5SITE}/NfSen/
${P5SITE}/NfSen/AbuseWhois.pm
${P5SITE}/NfSen/Log.pm
${P5SITE}/NfSen/Lookup.pm
${P5SITE}/NfSen/NfAlert.pm
${P5SITE}/NfSen/NfConf.pm
${P5SITE}/NfSen/NfProfile.pm
${P5SITE}/NfSen/NfSen.pm
${P5SITE}/NfSen/NfSenRC.pm
${P5SITE}/NfSen/NfSenRRD.pm
${P5SITE}/NfSen/NfSenSim.pm
${P5SITE}/NfSen/Nfcomm.pm
${P5SITE}/NfSen/Nfsources.pm
${P5SITE}/NfSen/Nfsync.pm
${P5SITE}/NfSen/Notification.pm
${P5SITE}/NfSen/installer-items/
${P5SITE}/NfSen/installer-items/CopyRecursive.pm
${P5SITE}/NfSen/installer-items/RRDconvertv1.pm
share/doc/pkg-readmes/${FULLPKGNAME}
share/examples/nfsen/
share/examples/nfsen/nfsen.conf
@sample ${SYSCONFDIR}/nfsen.conf
@mode 775
@owner _nfcapd
@group www
@sample /var/db/nfsen/
@sample /var/db/nfsen/ports-db/
@group
@owner
@mode
@exec-add usermod -v -G www _nfcapd
@rcscript ${RCDIR}/nfsen
@cwd /var/www
htdocs/nfsen/
htdocs/nfsen/alerting.php
htdocs/nfsen/colour_palette.html
htdocs/nfsen/colour_picker.html
htdocs/nfsen/conf.php
htdocs/nfsen/conf.php.dist
@sample htdocs/nfsen/conf.php
htdocs/nfsen/css/
htdocs/nfsen/css/alerting.css
htdocs/nfsen/css/detail.css

View File

@ -1,42 +0,0 @@
@comment $OpenBSD: PLIST-main,v 1.5 2012/12/28 21:03:40 naddy Exp $
@extraunexec rm -rf /var/db/nfsen/ports-db/*
bin/RebuildHierarchy.pl
bin/install-nfsen.pl
bin/nfsen
bin/nfsend
bin/testPlugin
lib/nfsen/
lib/nfsen/plugins/
lib/nfsen/plugins/PortTracker.pm
lib/nfsen/plugins/demoplugin.pm
lib/nfsen/plugins/smily.jpg
${P5SITE}/NfSen/
${P5SITE}/NfSen/Log.pm
${P5SITE}/NfSen/Lookup.pm
${P5SITE}/NfSen/NfAlert.pm
${P5SITE}/NfSen/NfConf.pm
${P5SITE}/NfSen/NfProfile.pm
${P5SITE}/NfSen/NfSen.pm
${P5SITE}/NfSen/NfSenRC.pm
${P5SITE}/NfSen/NfSenRRD.pm
${P5SITE}/NfSen/NfSenSim.pm
${P5SITE}/NfSen/Nfcomm.pm
${P5SITE}/NfSen/Nfsources.pm
${P5SITE}/NfSen/Notification.pm
${P5SITE}/NfSen/installer-items/
${P5SITE}/NfSen/installer-items/CopyRecursive.pm
${P5SITE}/NfSen/installer-items/RRDconvertv1.pm
share/doc/pkg-readmes/${FULLPKGNAME}
share/examples/nfsen/
share/examples/nfsen/nfsen.conf
@sample ${SYSCONFDIR}/nfsen.conf
@owner _nfcapd
@group www
@mode 775
@sample /var/db/nfsen/
@sample /var/db/nfsen/ports-db/
@mode
@group
@owner
@exec-add usermod -v -G www _nfcapd
@rcscript ${RCDIR}/nfsen

View File

@ -1,4 +1,4 @@
$OpenBSD: README-main,v 1.3 2012/04/22 11:41:55 ajacoutot Exp $
$OpenBSD: README,v 1.1 2013/05/03 01:17:10 sthen Exp $
+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
@ -22,7 +22,7 @@ Note, you may export netflow-compatible data from PF via pflow(4).
Chroot considerations
=====================
NfSen is written with chroot in mind and is capable of communicating
with the main nfcap daemon running outside the jail. Adapting to this
with the main nfcap daemon running outside the jail. Adapting to this
configuration is a simple matter of moving a few files around (while
the daemon is stopped).
@ -32,18 +32,19 @@ the daemon is stopped).
PortTracker
===========
This optional module splits up traffic by port number. It can be useful
but is somewhat experimental. You can attempt to use it like this:
This optional module splits up traffic by port number. It can be useful
but is somewhat experimental. You can attempt to use it like this:
- uncomment the sample PortTracker entry from the plugin
section in the sample ${SYSCONFDIR}/nfsen.conf
- start nftrack:
- start nftrack: note that this will require at least 10GB of space in
the database directory.
# sudo -u _nfcapd nftrack -I -d /var/db/nfsen/ports-db/
- restart nfsen
# ${RCDIR}/nfsen reload
# ${RCDIR}/nfsen restart
After the next processing interval, PortTracker should generate
data and graphs. If you have problems then examine system logs (you
data and graphs. If you have problems then examine system logs (you
may need to increase logging levels).