Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Snort-Users
[Top] [All Lists]

Re: [Snort-users] Start snort in daemon mode

Subject: Re: [Snort-users] Start snort in daemon mode
Date: Tue, 23 Nov 2004 10:42:12 -0700
try this script out:

#! /bin/bash
#
# snortd          Start/Stop the snort daemon.
#
# processname: snortd
# pidfile: /var/run/snortd.pid

# Source function library.
. /etc/init.d/functions

RETVAL=0

# See how we were called.

prog="Snort"

start() {
echo -n $"Starting $prog: "
daemon /usr/local/bin/snort -D -d -N -c /usr/local/snort/etc/snort.conf -i eth0 -g nobody -u nobody
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/snortd
return $RETVAL
}


stop() {
       echo -n $"Stopping $prog: "
       killproc snortd
       RETVAL=$?
       echo
       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/snortd
       return $RETVAL
}

rhstatus() {
status snortd
}

restart() {
       stop
       start
}

reload() {
       echo -n $"Reloading snortd daemon configuration: "
       killproc snortd -HUP
       retval=$?
       echo
       return $RETVAL
}

case "$1" in
 start)
       start
       ;;
 stop)
       stop
       ;;
 restart)
       restart
       ;;
 reload)
       reload
       ;;
 status)
       rhstatus
       ;;
 condrestart)
       [ -f /var/lock/subsys/snortd ] && restart || :
       ;;
 *)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
       exit 1
esac

exit $?


McKeeman, Samuel wrote:

Hello,

I was wondering if anyone could tell me how to start snort to run in daemon mode automatically?

Thanks

-sam

|

This email may contain confidential or privileged information. If you believe you have received the message in error, please notify the sender and delete the message without copying or disclosing it.
|



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Snort-users mailing list
Snort-users@lists.sourceforge.net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


<Prev in Thread] Current Thread [Next in Thread>