[Snort-users] Problems logging to syslog and mysql simultaneously

Frank Knobbe fknobbe at ...652...
Fri Jun 21 20:49:02 EDT 2002


On Wed, 2002-06-19 at 19:38, Michael Steele wrote:
> Don,
> 
> Hummm... This is bizarre... I have 37k alerts in my Syslog, so I know it
> works. Are you sure you don't have some service turned off that is
> preventing the alerts from arriving? 
> 
> What version of Snort?
> 
> Do you have alerts in the syslog?
> 
> Can you send me your snort.conf?


Not at all bizarre. I think this affects only the Windows version.
Here's why. The syslog config in snort.conf is useless under Windows
machines since it does not specify an IP address of a syslog server.
Windows not have a native syslog thingy, so without specifying an IP
address, Snort doesn't log. Again, only under Windows. Under *nix, the
syslog config in snort.conf works fine.

If you specify a syslog server with -s in the command line, you enable
Snort-win32 to log to syslog. However, the command line option overrides
the snort.conf, so other outputs don't work.

The solution is to hack the code. You can have Snort accept the -s
option, and at the same time still use snort.conf outputs. So after the
hack, you can log to syslog and *SQL.

In snort.c, withing ParseCmdLine, you'll find:

#ifdef WIN32
            case 'E':                /* log alerts to Event Log */
                pv.syslog_flag = 1;
                pv.syslog_remote_flag = 0;
                DebugMessage(DEBUG_INIT, "Logging alerts to Event
Log\n");
                pv.alert_cmd_override = 1;
                break;
#endif

Just remove the >pv.alert_cmd_override = 1;< and you can specify -s
without overriding the snort.conf.

Regards,
Frank


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 350 bytes
Desc: This is a digitally signed message part
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20020621/a4849354/attachment.sig>


More information about the Snort-users mailing list