From 68c77ad41d2c78937f7daffa23bee3115226368b Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Fri, 11 Jun 2004 13:51:06 +0000 Subject: Add ipfw2dshield, a script for parsing ipfw log messages and submitting reports to dshield.org (visit http://www.dshield.org for more info). PR: ports/67754 Submitted by: Frank W. Josellis --- security/Makefile | 1 + security/ipfw2dshield/Makefile | 31 ++++++++++++++++++++++++++ security/ipfw2dshield/distinfo | 2 ++ security/ipfw2dshield/files/patch-Makefile | 27 ++++++++++++++++++++++ security/ipfw2dshield/files/patch-README.html | 25 +++++++++++++++++++++ security/ipfw2dshield/files/patch-README.txt | 20 +++++++++++++++++ security/ipfw2dshield/files/patch-ipfw2dshield | 12 ++++++++++ security/ipfw2dshield/pkg-descr | 4 ++++ security/ipfw2dshield/pkg-plist | 4 ++++ 9 files changed, 126 insertions(+) create mode 100644 security/ipfw2dshield/Makefile create mode 100644 security/ipfw2dshield/distinfo create mode 100644 security/ipfw2dshield/files/patch-Makefile create mode 100644 security/ipfw2dshield/files/patch-README.html create mode 100644 security/ipfw2dshield/files/patch-README.txt create mode 100644 security/ipfw2dshield/files/patch-ipfw2dshield create mode 100644 security/ipfw2dshield/pkg-descr create mode 100644 security/ipfw2dshield/pkg-plist diff --git a/security/Makefile b/security/Makefile index c27c14c6abe4..2a6f4ee92bc7 100644 --- a/security/Makefile +++ b/security/Makefile @@ -133,6 +133,7 @@ SUBDIR += ike-scan SUBDIR += integrit SUBDIR += ipfmeta + SUBDIR += ipfw2dshield SUBDIR += isakmpd SUBDIR += its4 SUBDIR += john diff --git a/security/ipfw2dshield/Makefile b/security/ipfw2dshield/Makefile new file mode 100644 index 000000000000..50937dcadecb --- /dev/null +++ b/security/ipfw2dshield/Makefile @@ -0,0 +1,31 @@ +# New ports collection makefile for: ipfw2dshield +# Date created: 8 June 2004 +# Whom: Frank W. Josellis +# +# $FreeBSD$ +# + +PORTNAME= ipfw2dshield +PORTVERSION= 0.4 +CATEGORIES= security +MASTER_SITES= http://www.dynamical-systems.org/ipfw/ + +MAINTAINER= frank@dynamical-systems.org +COMMENT= A DShield client for ipfw logs + +USE_REINPLACE= yes + +PORTDOCS= CHANGES README.html README.txt + +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/ipfw2dshield + +post-install: +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +.for i in ${PORTDOCS} + ${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR} +.endfor +.endif + +.include diff --git a/security/ipfw2dshield/distinfo b/security/ipfw2dshield/distinfo new file mode 100644 index 000000000000..92ddd59b5d53 --- /dev/null +++ b/security/ipfw2dshield/distinfo @@ -0,0 +1,2 @@ +MD5 (ipfw2dshield-0.4.tar.gz) = c1a6d93170e4d8d390ab09a196e7b095 +SIZE (ipfw2dshield-0.4.tar.gz) = 16871 diff --git a/security/ipfw2dshield/files/patch-Makefile b/security/ipfw2dshield/files/patch-Makefile new file mode 100644 index 000000000000..0cfcba8f9a38 --- /dev/null +++ b/security/ipfw2dshield/files/patch-Makefile @@ -0,0 +1,27 @@ +--- Makefile.orig Sat May 29 16:27:21 2004 ++++ Makefile Fri Jun 11 15:41:20 2004 +@@ -4,7 +4,8 @@ + RMCMD = rm -f + INSTALL = install + +-prefix = /usr/local ++prefix = ${PREFIX} ++etcdir = $(prefix)/etc + sbindir = $(prefix)/sbin + + SUBDIRS = ipaddr strpdate +@@ -29,12 +30,12 @@ + @for subdir in $(SUBDIRS); do (cd $$subdir && make install) ; done + @[ -d $(sbindir) ] || mkdir -vp $(sbindir) + $(INSTALL) -c -m 700 -o root $(PROGRAM) $(sbindir) +- $(INSTALL) -c -m 600 -o root $(RC) $(HOME)/.$(RC).sample ++ $(INSTALL) -c -m 600 -o root $(RC) $(etcdir)/$(RC).sample + + uninstall: + @for subdir in $(SUBDIRS); do (cd $$subdir && make uninstall) ; done + -$(RMCMD) $(sbindir)/$(PROGRAM) +- -$(RMCMD) $(HOME)/.$(RC).sample ++ -$(RMCMD) $(etcdir)/$(RC).sample + + clean: + -$(RMCMD) *~ *.bak diff --git a/security/ipfw2dshield/files/patch-README.html b/security/ipfw2dshield/files/patch-README.html new file mode 100644 index 000000000000..43c6b5c0e6e6 --- /dev/null +++ b/security/ipfw2dshield/files/patch-README.html @@ -0,0 +1,25 @@ +--- README.html.orig Tue Jun 1 23:51:53 2004 ++++ README.html Wed Jun 9 12:46:58 2004 +@@ -38,9 +38,22 @@ + /usr/local/bin/ipaddr
+ ~/.ipfw2dshield.rc.sample + ++Note: For the FreeBSD ports version the sample configuration file is ++instead ++
++
++/usr/local/etc/ipfw2dshield.rc.sample ++
+ Copy or rename the sample configuration file to ~/.ipfw2dshield.rc + and edit this latter file to fit your local demands. Please read section 2 + below for an explanation of the configuration entries. ++

++ ++Note: The FreeBSD ports version does also accept ++/usr/local/etc/ipfw2dshield.rc ++as its configuration file. However, the preference is for ++~/.ipfw2dshield.rc ++in case that both these files exist. +

+ + The script creates a stampfile in /var/tmp where it stores date diff --git a/security/ipfw2dshield/files/patch-README.txt b/security/ipfw2dshield/files/patch-README.txt new file mode 100644 index 000000000000..a54b342053c8 --- /dev/null +++ b/security/ipfw2dshield/files/patch-README.txt @@ -0,0 +1,20 @@ +--- README.txt.orig Tue Jun 1 23:51:53 2004 ++++ README.txt Wed Jun 9 12:46:58 2004 +@@ -21,9 +21,17 @@ + /usr/local/bin/ipaddr + ~/.ipfw2dshield.rc.sample + ++NNoottee:: For the FreeBSD ports version the sample configuration file is instead ++ ++ /usr/local/etc/ipfw2dshield.rc.sample ++ + Copy or rename the sample configuration file to ~~//..iippffww22ddsshhiieelldd..rrcc and edit + this latter file to fit your local demands. Please read section 2 below for an + explanation of the configuration entries. ++ ++NNoottee:: The FreeBSD ports version does also accept //uussrr//llooccaall//eettcc//iippffww22ddsshhiieelldd..rrcc ++as its configuration file. However, the preference is for ~~//..iippffww22ddsshhiieelldd..rrcc in ++case that both these files exist. + + The script creates a stampfile in //vvaarr//ttmmpp where it stores date and time + information which will be accessed on a subsequent run to prevent multiple diff --git a/security/ipfw2dshield/files/patch-ipfw2dshield b/security/ipfw2dshield/files/patch-ipfw2dshield new file mode 100644 index 000000000000..b57625f0667c --- /dev/null +++ b/security/ipfw2dshield/files/patch-ipfw2dshield @@ -0,0 +1,12 @@ +--- ipfw2dshield.orig Sat May 29 16:26:59 2004 ++++ ipfw2dshield Tue Jun 8 23:11:07 2004 +@@ -247,7 +247,8 @@ + fi + + # Suck in the config file. +-rc=~/.$prog.rc ++rc=%%PREFIX%%/etc/$prog.rc ++[ -e ~/.$prog.rc ] && rc=~/.$prog.rc + [ -r $rc ] || bye "Permission denied: $rc" + . $rc + _logdir=$logdir diff --git a/security/ipfw2dshield/pkg-descr b/security/ipfw2dshield/pkg-descr new file mode 100644 index 000000000000..ee8398945c34 --- /dev/null +++ b/security/ipfw2dshield/pkg-descr @@ -0,0 +1,4 @@ +ipfw2shield is a DShield client for ipfw logs, i.e., it inspects +the firewall logs and can mail security reports to dshield.org + +WWW: http://www.dynamical-systems.org/ipfw/ diff --git a/security/ipfw2dshield/pkg-plist b/security/ipfw2dshield/pkg-plist new file mode 100644 index 000000000000..448b46f5435b --- /dev/null +++ b/security/ipfw2dshield/pkg-plist @@ -0,0 +1,4 @@ +bin/ipaddr +bin/strpdate +etc/ipfw2dshield.rc.sample +sbin/ipfw2dshield -- cgit v1.2.3