LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-14-2002, 10:16 AM   #1
Olusegun
LQ Newbie
 
Registered: Oct 2002
Location: Barbados
Distribution: Red Hat
Posts: 14

Rep: Reputation: 0
I want to start Snort as a service/daemon


I want to know how to start Snort automatically as a service/daemon when Red Hat boots up. I'm running Red Hat 7.3 and Snort 1.8.7. Can anyone give me some advice. Thank you all in advance.
 
Old 10-14-2002, 11:37 AM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Did you compile snort yourself or did you use some kind of binary distribution ? If you've chosen the RPM package, the script should already be placed into /etc/rc.d/init.d if you've been choosing to build snort from the sources (a good idea), the following might be what you're looking for:
Code:
#!/bin/sh
#
# snortd         Start/Stop the snort IDS daemon.
#
# chkconfig: 2345 40 60
# description:  snort is a lightweight network intrusion detection tool that
#               currently detects more than 1100 host and network
#               vulnerabilities, portscans, backdoors, and more.
#
# June 10, 2000 -- Dave Wreski <dave@linuxsecurity.com>
#   - initial version
#
# July 08, 2000 Dave Wreski <dave@guardiandigital.com>
#   - added snort user/group
#   - support for 1.6.2
# July 31, 2000 Wim Vandersmissen <wim@bofh.st>
#   - added chroot support

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

# Specify your network interface here
INTERFACE=eth0

# See how we were called.
case "$1" in
  start)
        echo -n "Starting snort: "
        cd /var/log/snort
        daemon /usr/bin/snort -b -l /var/log/snort -d -D \
                 -i $INTERFACE -c /etc/snort/snort.conf
        touch /var/lock/subsys/snort
        echo
        ;;
  stop)
        echo -n "Stopping snort: "
        killproc snort
        rm -f /var/lock/subsys/snort
        echo
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  status)
        status snort
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1
esac

exit 0
Copy & paste into /etc/rc.d/init.d/snortd
Code:
chmod 700 /etc/rc.d/init.d/snortd
chkconfig snortd on
 
Old 10-15-2002, 08:23 AM   #3
cottonmouth
Member
 
Registered: May 2002
Location: under the fig tree
Distribution: Redhat 8.0, Mandrake 9.0
Posts: 87

Rep: Reputation: 15
This is timely, I am getting ready to compile snort from source this morning but I seem to have forgotten the process for doing so. I know there is a series of switches and a make file but I seem to have forgotten what it was.

Help?
 
Old 10-15-2002, 10:35 AM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
./configure --help
./configure --desired-option=value ....
make
/bin/su
Password:
make install
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel panic after starting snort daemon dracolich Linux - Security 3 07-14-2005 06:08 PM
Snort daemon havelino Linux - Security 3 02-03-2005 05:12 AM
reconfigure snort daemon startup script hari_seldon99 Linux - Security 1 05-18-2004 01:40 AM
start service - mail daemon Nishtya Linux - Newbie 0 04-24-2004 04:12 PM
adding a new daemon (service) vjenks Linux - Newbie 3 02-11-2004 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration