I had a weird problem with snort recently. I downloaded the Red Hat 5 rpm from snort.org and installed it on a CentOS 5 machine. It installed fine and I looked over the config files in /etc/sysconfig/snort and /etc/snort/snort.conf. I changed what I needed for my configuration adding a line to the snort.conf file to set an output alert to send to the local syslog machine. Then restarted snort.
This is what the line in the /etc/snort/snort.conf file looks like.
output alert_syslog: LOG_LOCAL5 LOG_ALERT
That line sends alerts to the syslog log facility on LOCAL5. To finish the remote syslog setup on the snort machine you just need to add a line to the same machines /etc/syslog.conf file so it will send those logs sent to LOCAL5 to the remote loghost. That line looks like this.
Restart the syslogd service. The last thing you need to do to get the messages from the snort machine to the loghost issetup the local5 log facility in the loghosts /etc/syslog.conf. That line will look like the following.
After putting in that line restart syslogd and the alerts from snort should start going to the /var/log/snort file. That is what is supposed to happen. I started a tail -f /var/log/snort on the file and I was getting nothing. I rechecked my setup and it looked correct. After pouring through the syslog on the snort machine I found an interesting message in the snort startup output.
command line overrides rules file alert plugin!
The default variables used during snort startup where overriding the output plugins! Sure enough I checked the snort faq and it said "Using "-A" or "-s" will override any database logging configuration". This also seems to be true for syslog logging as well. By default the rpm snort.org gives out sets -A which overrides the output logging config. What a pain! So to fix this you can set the alert mode to blank in the /etc/sysconfig/snort file. So it looks like the following.
Doing this will keep the -A from being used on startup. After blanking this and restaring snort the messages started flowing.