rsyslog sending iptables to new file =)

  • dyfrin
  • Proficient
  • Proficient
  • User avatar
  • Joined: May 10, 2006
  • Posts: 499
  • Loc: WI
  • Status: Offline

Post February 17th, 2009, 12:30 pm

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?
dyfrin.com
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 17th, 2009, 12:30 pm

  • dyfrin
  • Proficient
  • Proficient
  • User avatar
  • Joined: May 10, 2006
  • Posts: 499
  • Loc: WI
  • Status: Offline

Post February 25th, 2009, 10:27 am

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
dyfrin.com
  • give-us-postaccs
  • Born
  • Born
  • No Avatar
  • Joined: Nov 24, 2009
  • Posts: 1
  • Status: Offline

Post November 24th, 2009, 9:52 am

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 80 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.