#!/usr/local/bin/bash # # snort setup file # # # Zoidial, Inc. # Eric Thern eric@zoidial.com # March 2002 # if [ "`uname -s`" == "FreeBSD" ]; then echo " You are running FreeBSD Installing snort from the ports! " sleep 5 cd /usr/ports/security/snort make make deinstall make install else echo " You are running Linux Downloading and Installing snort from source! " sleep 5 cd /usr/local/snort/ wget http://www.snort.org/dl/snapshots/snort-stable-snapshot.tar.gz sleep 2; if [ -f snort-stable-snaptshot.tar.gz ]; then tar -xzvf snort-stable-snapshot.tar.gz else mv snort-stable-snapshot.tar.gz.1 snort.stable.snapshot.tar.gz tar -xzvf snort-stable-snapshot.tar.gz fi fi echo "============================================" echo "Downloaded snort and extracted it." echo "============================================" # # proper permissions for the chrooted directory :) # chmod 700 /usr/local/snort chown -R nobody:nobody /usr/local/snort echo " If you are using syslog to log things, add the following to /etc/syslog.conf (for linux) local6.* /var/log/snort.log add the following to /etc/syslog.conf (for FreeBSD) !snort *.* /var/log/snort.log And then something to keep the logs rotated: (this is for FreeBSD's newsyslog): /var/log/snort.log root.wheel 600 10 22300 * Z !!!!!!!!!! !!!!!!!!!! OR ... run the setup-logging script! "