mafflog
random stuff for teh interwebs
  • About
  • Projects
  • Archives
Home » firewall

Shorewall logcheck pattern

June 5, 2011 · in Linux, Snippets

A logcheck ignore pattern to filter out shorewall REJECT and DROP entries (net is defined as eth0). /etc/logwatch/ignore.d.server/shorewall:

^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? Shorewall:net2([a-z0-9]*):(REJECT|DROP)

Test if the regex works for your config:

sed -e 's/[[:space:]]*$//' /var/log/syslog | egrep '^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? Shorewall:net2([a-z0-9]*):(REJECT|DROP)'
github github github

Search

Categories

  • Android
  • Development
  • Fun
  • General
  • Hardware
  • How-Tos
  • Kitchen
  • Linux
  • No Comment
  • Projects
  • Server
  • Snippets
  • Software
  • Video
  • Web
  • Windows
  • Wordpress

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Copyright © 2008-2013 mafflog