summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/snort/README42
-rw-r--r--network/snort/doinst.sh18
-rw-r--r--network/snort/slack-desc19
-rw-r--r--network/snort/snort.SlackBuild90
-rw-r--r--network/snort/snort.info8
5 files changed, 177 insertions, 0 deletions
diff --git a/network/snort/README b/network/snort/README
new file mode 100644
index 0000000000..6a15d09b62
--- /dev/null
+++ b/network/snort/README
@@ -0,0 +1,42 @@
+Snort is an open source network intrusion detection and prevention system. It
+is capable of performing real-time traffic analysis, alerting, blocking and
+packet logging on IP networks. It utilizes a combination of protocol analysis
+and pattern matchingin order to detect a anomalies, misuse and attacks.
+Snort uses a flexible rules language to describe activity that can be considered
+malicious or anomalous as well as an analysis engine that incorporates a modular
+plugin architecture. Snort is capable of detecting and responding in real-time,
+sending alerts, performing session sniping, logging packets, or dropping
+sessions/packets when deployed in-line.
+
+Snort has three primary functional modes. It can be used as a packet sniffer
+like tcpdump(1), a packet logger (useful for network traffic debugging, etc),
+or as a full blown network intrusion detection and prevention system.
+
+Please read the snort_manual.pdf file that should be included with this
+distribution for full documentation on the program as well as a guide to
+getting started.
+
+This package builds a very basic snort implimentation useful for monitoring
+traffic as an IDS or packet logger and as a sort of improved tcpdump (which
+is what I use it for). MySQL support is included, so you should have little
+trouble hooking snort up to a database or ACID. For more information on
+these, check out snort's homepage at:
+
+ http://www.snort.org/
+ http://www.snort.org/docs/
+
+snort.org has a nasty habit of changing the location of their source
+code, which means there's no garauntee that the link in snort.info is
+correct. If you can't get that link to work, look for the source code at:
+
+ http://www.snort.org/dl/old/
+
+Please note that this build script disables dynamic plugins. This can be
+easily added by deleting the following line in the script.
+
+ --disable-dynamicplugin \
+
+This will put the headers and source for dynamic plugins into /usr/src/snort.
+There is no rc.snort script included with this script at this time, but you
+should have little trouble creating one of your own. Please e-mail me with
+any questions or comments. -- Alan Hicks <alan@lizella.net>
diff --git a/network/snort/doinst.sh b/network/snort/doinst.sh
new file mode 100644
index 0000000000..f10be9c005
--- /dev/null
+++ b/network/snort/doinst.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/snort/snort.conf.new
+config etc/snort/reference.config.new
+config etc/snort/threshold.conf.new
+
diff --git a/network/snort/slack-desc b/network/snort/slack-desc
new file mode 100644
index 0000000000..82adf775a7
--- /dev/null
+++ b/network/snort/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-------handy-ruler-----------------------------------------------------|
+snort: Snort Intrusion Detection and Prevention System
+snort:
+snort: Snort is an open source network intrusion detection and prevention
+snort: system. It is capable of performing real-time traffic analysis,
+snort: alerting, blocking and packet logging on IP networks. It utilizes a
+snort: combination of protocol analysis and pattern matchingin order to detect
+snort: anomalies, misuse and attacks.
+snort: Snort is capable of detecting and responding in real-time, sending
+snort: alerts, performing session sniping, logging packets, or dropping
+snort: sessions/packets when deployed in-line.
+snort:
diff --git a/network/snort/snort.SlackBuild b/network/snort/snort.SlackBuild
new file mode 100644
index 0000000000..d12fa64d25
--- /dev/null
+++ b/network/snort/snort.SlackBuild
@@ -0,0 +1,90 @@
+#!/bin/sh
+# Copyright 2006, Alan Hicks, Lizella, GA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified by the SlackBuilds.org project
+
+PRGNAM=snort
+VERSION=2.6.1.5
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/pkg-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP || exit 1
+rm -rf $PRGNAM-$VERSION
+tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+cd $PRGNAM-$VERSION || exit 1
+
+# Fix ownership and permissions inside the source tarball.
+# It's appalling how many projects have 777 permissions or
+# even suid, sgid, and sticky bits set on things.
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-pthread \
+ --enable-linux-smp-stats \
+ --with-mysql=/usr \
+ --disable-dynamicplugin \
+ || exit 1
+
+make || exit 1
+make install-strip DESTDIR=$PKG || exit 1
+
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING ChangeLog LICENSE RELEASE.NOTES doc/* $PKG/usr/doc/$PRGNAM-$VERSION/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Setup a sane config directory - snort won't do this on its own
+mkdir -p $PKG/etc/snort
+cat etc/snort.conf > $PKG/etc/snort/snort.conf.new
+cat etc/reference.config > $PKG/etc/snort/reference.config.new
+cat etc/threshold.conf > $PKG/etc/snort/threshold.conf.new
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/network/snort/snort.info b/network/snort/snort.info
new file mode 100644
index 0000000000..5f294dce99
--- /dev/null
+++ b/network/snort/snort.info
@@ -0,0 +1,8 @@
+PRGNAM="snort"
+VERSION="2.6.1.5"
+HOMEPAGE="http://www.snort.org/"
+DOWNLOAD="http://www.snort.org/dl/current/snort-2.6.1.5.tar.gz"
+MD5SUM="e52a7ea6ba9743a8f8ca397cd26fa1bf"
+MAINTAINER="Alan_Hicks"
+EMAIL="alan@lizella.net"
+APPROVED="rworkman"