Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 109931 - multiple snort instances
Summary: multiple snort instances
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-20 08:47 UTC by Eric Brown
Modified: 2006-03-05 19:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Brown 2005-10-20 08:47:21 UTC
I created multiple snort instances by copying /etc/init.d/snort and
/etc/conf.d/snort so that I have 2 services, snort and snort2.

I am filing this bug because the start() functions were using start-stop-daemon
incorrectly (at least for my setup).  If we use a PID file to stop a process, we
should use it to start one too... This is why I changed the start-stop-daemon
line in start() to also contain --pidfile ${PIDFILE}.  Without that, you can't
start multiple instances of snort, and it also just makes more sense to identify
it by PID.


Does anyone else think we should implement a more elegant way of running
multiple instances of snort?  Maybe some magic in conf.d/snort and some symlinks
in init.d kinda like net.* ?

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2005-10-20 15:31:46 UTC
snort is currently assigning its PID according to the options set in
/etc/conf.d/snort. I'll look into the pidfile creation though, as I am not
convinced how we are doing it now is the best way.
Comment 2 Tomoyuki Sakurai (RETIRED) gentoo-dev 2005-10-31 16:20:48 UTC
in util.c

779     snprintf(pv.pid_filename, STD_BUF,  "%s/snort_%s%s.pid", pv.pid_path, intf,
780             pv.pidfile_suffix);

it seems like the filename is hardcoded.
snort should support an option like --pid or something similar in snort.conf
Comment 3 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2005-11-26 05:58:29 UTC
The only way we can make this happy is by calling start-stop-daemon with -b -m
--pidfile, which i think is ugly and unnecessary. It will still create its
hardcoded pid and to be honest I don't see why you need more then one snort
running at any point in time. This would have to be resolve upstream if you
really see the need.
Comment 4 Eric Brown 2006-03-05 19:43:16 UTC
It's has been useful to have more than one snort instance for 2 very good reasons so far:

1) sniffing on 2 different interfaces that should use different rule sets
2) using database output with a setup where you have 2 interfaces (you need two instances, two databases to avoid atomicity issues)
Comment 5 Eric Brown 2006-03-05 19:48:44 UTC
I think this is a dup of bug 123169 (i posted it again by accident?)
Anyway, in that bug, the problem is apparently fixed...