From e3f803b702a39c5004cf3e614f4bc2307f576a3c Mon Sep 17 00:00:00 2001 From: Ben Schweikert Date: Thu, 17 Sep 2015 10:43:50 +0200 Subject: [PATCH] New package: libnetfilter_log New package: libnetfilter_acct modified kernel config for i586: added netfilter_ulog as a module New package: ulogd: Deamon to log data traffic with servers like pmacctd. All other packages are dependencies of ulogd. --- config/kernel/kernel.config.i586-ipfire | 4 +- config/kernel/kernel.config.i586-ipfire-pae | 4 +- config/rootfiles/common/i586/linux | 2 + config/rootfiles/common/libnetfilter_acct | 7 ++ config/rootfiles/common/libnetfilter_log | 13 ++++ config/rootfiles/packages/ulogd | 53 +++++++++++++ lfs/libnetfilter_acct | 77 ++++++++++++++++++ lfs/libnetfilter_log | 77 ++++++++++++++++++ lfs/ulogd | 86 +++++++++++++++++++++ 9 files changed, 319 insertions(+), 4 deletions(-) create mode 100644 config/rootfiles/common/libnetfilter_acct create mode 100644 config/rootfiles/common/libnetfilter_log create mode 100644 config/rootfiles/packages/ulogd create mode 100644 lfs/libnetfilter_acct create mode 100644 lfs/libnetfilter_log create mode 100644 lfs/ulogd diff --git a/config/kernel/kernel.config.i586-ipfire b/config/kernel/kernel.config.i586-ipfire index f5ff73efb..503372242 100644 --- a/config/kernel/kernel.config.i586-ipfire +++ b/config/kernel/kernel.config.i586-ipfire @@ -1050,7 +1050,7 @@ CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_SYNPROXY=m -# CONFIG_IP_NF_TARGET_ULOG is not set +CONFIG_IP_NF_TARGET_ULOG=m CONFIG_NF_NAT_IPV4=m CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_NETMAP=m @@ -1120,7 +1120,7 @@ CONFIG_BRIDGE_EBT_MARK_T=m CONFIG_BRIDGE_EBT_REDIRECT=m CONFIG_BRIDGE_EBT_SNAT=m CONFIG_BRIDGE_EBT_LOG=m -# CONFIG_BRIDGE_EBT_ULOG is not set +CONFIG_BRIDGE_EBT_ULOG=m CONFIG_BRIDGE_EBT_NFLOG=m # CONFIG_IP_DCCP is not set CONFIG_IP_SCTP=m diff --git a/config/kernel/kernel.config.i586-ipfire-pae b/config/kernel/kernel.config.i586-ipfire-pae index 8e7220184..f7368168e 100644 --- a/config/kernel/kernel.config.i586-ipfire-pae +++ b/config/kernel/kernel.config.i586-ipfire-pae @@ -1064,7 +1064,7 @@ CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_SYNPROXY=m -# CONFIG_IP_NF_TARGET_ULOG is not set +CONFIG_IP_NF_TARGET_ULOG=m CONFIG_NF_NAT_IPV4=m CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_NETMAP=m @@ -1134,7 +1134,7 @@ CONFIG_BRIDGE_EBT_MARK_T=m CONFIG_BRIDGE_EBT_REDIRECT=m CONFIG_BRIDGE_EBT_SNAT=m CONFIG_BRIDGE_EBT_LOG=m -# CONFIG_BRIDGE_EBT_ULOG is not set +CONFIG_BRIDGE_EBT_ULOG=m CONFIG_BRIDGE_EBT_NFLOG=m # CONFIG_IP_DCCP is not set CONFIG_IP_SCTP=m diff --git a/config/rootfiles/common/i586/linux b/config/rootfiles/common/i586/linux index ff17a6268..2ac1f9fc9 100644 --- a/config/rootfiles/common/i586/linux +++ b/config/rootfiles/common/i586/linux @@ -3075,5 +3075,7 @@ lib/modules/KVER-ipfire #lib/modules/KVER-ipfire/modules.symbols #lib/modules/KVER-ipfire/modules.symbols.bin #lib/modules/KVER-ipfire/source +#lib/modules/KVER-ipfire/kernel/net/bridge/netfilter/ebt_ulog.ko +#lib/modules/KVER-ipfire/kernel/net/ipv4/netfilter/ipt_ULOG.ko sbin/gen_init_cpio boot/initramfs-KVER-ipfire.img diff --git a/config/rootfiles/common/libnetfilter_acct b/config/rootfiles/common/libnetfilter_acct new file mode 100644 index 000000000..d3b23b54e --- /dev/null +++ b/config/rootfiles/common/libnetfilter_acct @@ -0,0 +1,7 @@ +#usr/include/libnetfilter_acct +#usr/include/libnetfilter_acct/libnetfilter_acct.h +#usr/lib/libnetfilter_acct.la +usr/lib/libnetfilter_acct.so +usr/lib/libnetfilter_acct.so.1 +usr/lib/libnetfilter_acct.so.1.0.0 +usr/lib/pkgconfig/libnetfilter_acct.pc diff --git a/config/rootfiles/common/libnetfilter_log b/config/rootfiles/common/libnetfilter_log new file mode 100644 index 000000000..4791ed8c0 --- /dev/null +++ b/config/rootfiles/common/libnetfilter_log @@ -0,0 +1,13 @@ +#usr/include/libnetfilter_log +#usr/include/libnetfilter_log/libipulog.h +#usr/include/libnetfilter_log/libnetfilter_log.h +#usr/include/libnetfilter_log/linux_nfnetlink_log.h +#usr/lib/libnetfilter_log.la +usr/lib/libnetfilter_log.so +usr/lib/libnetfilter_log.so.1 +usr/lib/libnetfilter_log.so.1.1.0 +usr/lib/libnetfilter_log_libipulog.la +usr/lib/libnetfilter_log_libipulog.so +usr/lib/libnetfilter_log_libipulog.so.1 +usr/lib/libnetfilter_log_libipulog.so.1.0.0 +usr/lib/pkgconfig/libnetfilter_log.pc diff --git a/config/rootfiles/packages/ulogd b/config/rootfiles/packages/ulogd new file mode 100644 index 000000000..71700b07a --- /dev/null +++ b/config/rootfiles/packages/ulogd @@ -0,0 +1,53 @@ +#usr/lib/ulogd +#usr/lib/ulogd/ulogd_filter_HWHDR.la +usr/lib/ulogd/ulogd_filter_HWHDR.so +#usr/lib/ulogd/ulogd_filter_IFINDEX.la +usr/lib/ulogd/ulogd_filter_IFINDEX.so +#usr/lib/ulogd/ulogd_filter_IP2BIN.la +usr/lib/ulogd/ulogd_filter_IP2BIN.so +#usr/lib/ulogd/ulogd_filter_IP2HBIN.la +usr/lib/ulogd/ulogd_filter_IP2HBIN.so +#usr/lib/ulogd/ulogd_filter_IP2STR.la +usr/lib/ulogd/ulogd_filter_IP2STR.so +#usr/lib/ulogd/ulogd_filter_MARK.la +usr/lib/ulogd/ulogd_filter_MARK.so +#usr/lib/ulogd/ulogd_filter_PRINTFLOW.la +usr/lib/ulogd/ulogd_filter_PRINTFLOW.so +#usr/lib/ulogd/ulogd_filter_PRINTPKT.la +usr/lib/ulogd/ulogd_filter_PRINTPKT.so +#usr/lib/ulogd/ulogd_filter_PWSNIFF.la +usr/lib/ulogd/ulogd_filter_PWSNIFF.so +#usr/lib/ulogd/ulogd_inpflow_NFACCT.la +usr/lib/ulogd/ulogd_inpflow_NFACCT.so +#usr/lib/ulogd/ulogd_inpflow_NFCT.la +usr/lib/ulogd/ulogd_inpflow_NFCT.so +#usr/lib/ulogd/ulogd_inppkt_NFLOG.la +usr/lib/ulogd/ulogd_inppkt_NFLOG.so +#usr/lib/ulogd/ulogd_inppkt_ULOG.la +usr/lib/ulogd/ulogd_inppkt_ULOG.so +#usr/lib/ulogd/ulogd_inppkt_UNIXSOCK.la +usr/lib/ulogd/ulogd_inppkt_UNIXSOCK.so +#usr/lib/ulogd/ulogd_output_GPRINT.la +usr/lib/ulogd/ulogd_output_GPRINT.so +#usr/lib/ulogd/ulogd_output_GRAPHITE.la +usr/lib/ulogd/ulogd_output_GRAPHITE.so +#usr/lib/ulogd/ulogd_output_LOGEMU.la +usr/lib/ulogd/ulogd_output_LOGEMU.so +#usr/lib/ulogd/ulogd_output_MYSQL.la +usr/lib/ulogd/ulogd_output_MYSQL.so +#usr/lib/ulogd/ulogd_output_NACCT.la +usr/lib/ulogd/ulogd_output_NACCT.so +#usr/lib/ulogd/ulogd_output_OPRINT.la +usr/lib/ulogd/ulogd_output_OPRINT.so +#usr/lib/ulogd/ulogd_output_PCAP.la +usr/lib/ulogd/ulogd_output_PCAP.so +#usr/lib/ulogd/ulogd_output_SQLITE3.la +usr/lib/ulogd/ulogd_output_SQLITE3.so +#usr/lib/ulogd/ulogd_output_SYSLOG.la +usr/lib/ulogd/ulogd_output_SYSLOG.so +#usr/lib/ulogd/ulogd_output_XML.la +usr/lib/ulogd/ulogd_output_XML.so +#usr/lib/ulogd/ulogd_raw2packet_BASE.la +usr/lib/ulogd/ulogd_raw2packet_BASE.so +usr/sbin/ulogd +#usr/share/man/man8/ulogd.8 diff --git a/lfs/libnetfilter_acct b/lfs/libnetfilter_acct new file mode 100644 index 000000000..c7e96901d --- /dev/null +++ b/lfs/libnetfilter_acct @@ -0,0 +1,77 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2013 IPFire Team # +# # +# 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 = 1.0.2 + +THISAPP = libnetfilter_acct-$(VER) +DL_FILE = $(THISAPP).tar.bz2 +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 2118d9514c079839ebd9cb3144ad2ad7 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +############################################################################### +# 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) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure --prefix=/usr + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/lfs/libnetfilter_log b/lfs/libnetfilter_log new file mode 100644 index 000000000..814d0665d --- /dev/null +++ b/lfs/libnetfilter_log @@ -0,0 +1,77 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2013 IPFire Team # +# # +# 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 = 1.0.1 + +THISAPP = libnetfilter_log-$(VER) +DL_FILE = $(THISAPP).tar.bz2 +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 2a4bb0654ae675a52d2e8d1c06090b94 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +############################################################################### +# 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) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure --prefix=/usr + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/lfs/ulogd b/lfs/ulogd new file mode 100644 index 000000000..2c62cb66e --- /dev/null +++ b/lfs/ulogd @@ -0,0 +1,86 @@ +############################################################################### +# # +# 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 = 2.0.5 + +THISAPP = ulogd-$(VER) +DL_FILE = $(THISAPP).tar.bz2 +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = ulogd +PAK_VER = 1 + +#DEPS = "dbus libdaemon" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = f0f8fe1371fa28b5e06cb16aaa0111dd + +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) && tar xvf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure \ + --prefix=/usr \ + --sysconfdir=/etc + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) -- 2.47.2