rsyslog: log du firewall (komaz only)

This commit is contained in:
Daniel STAN 2014-04-06 20:05:29 +02:00
parent 62876e9e77
commit d8c40fcad2
2 changed files with 36 additions and 0 deletions

View file

@ -16,5 +16,9 @@
</Group>
</Group>
<Group name="komaz">
<Path name="/etc/rsyslog.d/10-firewall.conf"/>
</Group>
<Package name="rsyslog-relp"/>
</Bundle>

View file

@ -0,0 +1,32 @@
# !! Fichier géré par bcfg2 !!
#$ModLoad imklog #Déjà présent dans rsyslog.conf
# Messages du firewall (ie de sa génération)
if $programname == 'firewall' and $syslogseverity <= '3' then /var/log/firewall/iptables.err
if $programname == 'firewall' then /var/log/firewall/iptables.log
# kernel (facility = 0):
# Discard broadcast (sinon trop de spam)
# Note: on discard tout au final, sinon, on risquerait d'envoyer du contenu
# (LOG_ALL est dans PREROUTING donc je sais pas si ça compte, mais je veux
# pas essayer)
if $syslogfacility == '0' and $msg contains 'ff:ff:ff:ff:ff:ff' then ~
# LOG_ALL pour … je sais plus à quoi ça sert …
if $syslogfacility == '0' and $msg contains 'LOG_ALL' then /var/log/firewall/logall.log
& ~
# LOG_MAC_IP pour l'association mac_ip en ipv6
if $syslogfacility == '0' and $msg contains 'LOG_MAC_IP' then /var/log/firewall/logmacip.log
& ~
# TRACE
if $syslogfacility == '0' and $msg contains 'TRACE:' then /var/log/firewall/trace.log
& ~
# filtre.log est parsé par un script pour gérer les déconnexions
if $syslogfacility == '0' and $msg contains 'DST=' then /var/log/firewall/filtre.log
& ~