From: root Date: Thu, 16 Feb 2017 06:44:57 +0000 (+0100) Subject: New package: nDPI with netfilter modules. X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fndpi;p=people%2Ftrikolon%2Fipfire-2.x.git New package: nDPI with netfilter modules. nDPI is a ntop-maintained superset of the popular OpenDPI library. Released under the LGPL license, its goal is to extend the original library by adding new protocols that are otherwise available only on the paid version of OpenDPI. In addition to Unix platforms, we also support Windows, in order to provide you a cross-platform DPI experience. Furthermore, we have modified nDPI do be more suitable for traffic monitoring applications, by disabling specific features that slow down the DPI engine while being them un-necessary for network traffic monitoring. nDPI is used by both ntop and nProbe for adding application-layer detection of protocols, regardless of the port being used. This means that it is possible to both detect known protocols on non-standard ports (e.g. detect http non ports other than 80), and also the opposite (e.g. detect Skype traffic on port 80). This is because nowadays the concept of port=application no longer holds. Auf Branch ndpi Ihr Branch ist auf dem selben Stand wie 'origin/master'. zum Commit vorgemerkte Änderungen: neue Datei: config/rootfiles/packages/ndpi-netfilter neue Datei: lfs/ndpi-netfilter neue Datei: src/paks/ndpi-netfilter/install.sh neue Datei: src/paks/ndpi-netfilter/uninstall.sh neue Datei: src/paks/ndpi-netfilter/update.sh --- diff --git a/config/rootfiles/packages/ndpi-netfilter b/config/rootfiles/packages/ndpi-netfilter new file mode 100644 index 000000000..7f029d90b --- /dev/null +++ b/config/rootfiles/packages/ndpi-netfilter @@ -0,0 +1,19 @@ +#lib/modules/3.14.79 +lib/modules/3.14.79-ipfire/extra/xt_ndpi.ko +lib/xtables/libxt_ndpi.so +usr/bin/ndpiReader +#usr/include/libndpi-1.8.0 +#usr/include/libndpi-1.8.0/libndpi +#usr/include/libndpi-1.8.0/libndpi/ndpi_api.h +#usr/include/libndpi-1.8.0/libndpi/ndpi_define.h +#usr/include/libndpi-1.8.0/libndpi/ndpi_includes.h +#usr/include/libndpi-1.8.0/libndpi/ndpi_main.h +#usr/include/libndpi-1.8.0/libndpi/ndpi_protocol_ids.h +#usr/include/libndpi-1.8.0/libndpi/ndpi_protocols.h +#usr/include/libndpi-1.8.0/libndpi/ndpi_typedefs.h +#usr/lib/libndpi.a +#usr/lib/libndpi.la +usr/lib/libndpi.so +usr/lib/libndpi.so.1 +usr/lib/libndpi.so.1.0.0 +usr/lib/pkgconfig/libndpi.pc diff --git a/lfs/ndpi-netfilter b/lfs/ndpi-netfilter new file mode 100644 index 000000000..51280f13b --- /dev/null +++ b/lfs/ndpi-netfilter @@ -0,0 +1,92 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 3.0 + +THISAPP = ndpi-netfilter-master +DL_FILE = $(THISAPP).zip +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = ndpi-netfilter +PAK_VER = 1 + +DEPS = "" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = b7c54679ee967fab4a67990079b162ff + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && unzip $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && tar xvf nDPI.tar.gz + cd $(DIR_APP)/nDPI/ && ./autogen.sh + cd $(DIR_APP)/nDPI/ && ./configure \ + --prefix=/usr \ + --sysconfdir=/etc + cd $(DIR_APP)/nDPI/ && make $(MAKETUNING) + cd $(DIR_APP)/nDPI/ && make install + ln -s /lib/modules/$(KVER)-ipfire /lib/modules/$(KVER) + cd $(DIR_APP) && NDPI_PATH=$(DIR_APP)/nDPI make + cd $(DIR_APP) && make modules_install + cp $(DIR_APP)/ipt/libxt_ndpi.so /lib/xtables/ + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/src/paks/ndpi-netfilter/install.sh b/src/paks/ndpi-netfilter/install.sh new file mode 100644 index 000000000..da1f3f409 --- /dev/null +++ b/src/paks/ndpi-netfilter/install.sh @@ -0,0 +1,28 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +modprobe libxt-ndpi +restore_backup ${NAME} +start_service --background ${NAME} diff --git a/src/paks/ndpi-netfilter/uninstall.sh b/src/paks/ndpi-netfilter/uninstall.sh new file mode 100644 index 000000000..66f4344eb --- /dev/null +++ b/src/paks/ndpi-netfilter/uninstall.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +make_backup ${NAME} +remove_files diff --git a/src/paks/ndpi-netfilter/update.sh b/src/paks/ndpi-netfilter/update.sh new file mode 100644 index 000000000..89c40d0d7 --- /dev/null +++ b/src/paks/ndpi-netfilter/update.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh