+ Logging, Syslog and Log Anaylsys Forums » Forums » Syslog & syslogd
|-+ 

splitting kernel messages out to different logs

Username:
Password:
News:

Pages: [1]
0 Members and 1 Guest are viewing this topic. Topic Tools  
Read March 22, 2004, 12:19:06 am #0
unkowen

splitting kernel messages out to different logs

I need to now if there is any way to have kernal.warn messages from iptables sent to a different log then my kernal.warn messages from other system dameons/services.
 
Read June 28, 2004, 08:55:51 am #1
Anonymous

splitting kernel messages out to different logs

I don't think so.  You may be able to use something like metalog (http://metalog.sourceforce.net), but if iptables uses kernel.warn to classify its messages, I don't think it'll work.
 
Read April 29, 2005, 03:08:11 pm #2
mutex

splitting kernel messages out to different logs

I believe if you convert to syslog-ng, you would be able to use a filter to recognize that the logs came from iptables.  I'm not 100% sure, though.
Offline  
Read May 02, 2005, 08:36:59 pm #3
gundalba

splitting kernel messages out to different logs

Just a theory yet but am thinking about piping the log into a small parsing script to generate seperate files...
Offline  
Read May 04, 2005, 08:35:05 am #4
mutex

splitting kernel messages out to different logs

You can certainly do that, in fact the user "Jeff" posted a perl script that does just that, if you search for it here.  But, the reality is that it's a bit of a hack to do it that way.  The support that syslog-ng has to split messages into different files is very clean and easy to maintain.  Just my opinion, though.
Offline  
Read May 30, 2005, 08:28:16 am #5
mutex

splitting kernel messages out to different logs

If you're able to identify and separate them with a script, then you would be able to do it with syslog-ng as well.
Offline  
Read October 16, 2008, 10:07:42 am #6
rgerhards

Re: splitting kernel messages out to different logs

Another follow-up after coming back to the forum.

With rsyslog, you can easily do this. The primary trick is that you include a text with each of the iptables log entries. Then, you can use so-called "contains" searches, which check for the text in question inside the log entries. This can be done as part of regular rule processing.

Note that rsyslog is the standard syslogd on Fedora 8+ and will be the standard on the next release of Debian. So you may already using it and just need to deploy the necessary rules. As this topic seems to be of interest to many people (judging from the access count), I'll probably write a HOWTO. If so, I'll post the link here (so it probably is a good idea to subscribe to the thread if you are intersted in the HOWTO Wink).
Offline  
Pages: [1]
Jump to:  


Information Security News | Jerry Bell's blog | Enterprise IT | Tropical Fish Information | Tropical Fish Forums