rsyslog sending iptables to new file =)

  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

Hello,
Just updated to Fedora 10.
The syslog was changed to rsyslog, which sounds great, the ability to use rules to send certain messages to a new location (local/remote).

Originally for iptables I set the level, and then on syslog.conf put that level to log to iptables.log. Not the perfect thing as other stuff went into that log file as well.

But rsyslog supposedly can filter, yet my rules are not working, they cease to log at all. Tried a bunch of stuff like:
Code: [ Select ]
:regex, contains, "iptables" *.*                              /var/log/iptables


Anyone got rsyslog conf working to filter messages?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

Ok got it solved for anyone else wanting to separate log files.
Code: [ Select ]
 
:msg,contains,"iptables" /var/log/iptables
& ~
*.info;mail.none;authpriv.none;cron.none /var/log/messages
  1.  
  2. :msg,contains,"iptables" /var/log/iptables
  3. & ~
  4. *.info;mail.none;authpriv.none;cron.none /var/log/messages
  • give-us-postaccs
  • Born
  • Born
  • give-us-postaccs
  • Posts: 1

Post 3+ Months Ago

Hello dyfrin,

fantastic! - This was EXACTLY what i was looking for, after setting up a new ubuntu system which gets shipped with rsyslog ;)

Many thanks for replying to yourself :D


___
just some more tags for google i was looking before i arrive here:
rsyslog, iptables, change destination, filter out, different file, logfile, messages

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 20 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.