Hier zwei Beispielzeilen
Code: Alles auswählen
Sep 17 15:24:48 itex-d0 kernel: [17416.582391] IN=xenbr0 OUT= PHYSIN=eth0 MAC=6c:62:6d:58:b2:c2:00:26:88:75:ff:14:08:00 SRC=217.118.79.33 DST=x.x.x.x LEN=48 TOS=0x08 PREC=0x40 TTL=50 ID=20901 DF PROTO=TCP SPT=9741 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
Sep 17 15:24:48 itex-d0 kernel: [17416.586788] IN=xenbr0 OUT= PHYSIN=eth0 MAC=6c:62:6d:58:b2:c2:00:26:88:75:ff:14:08:00 SRC=217.118.79.33 DST=x.x.x.x LEN=48 TOS=0x08 PREC=0x40 TTL=50 ID=20901 DF PROTO=TCP SPT=9741 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
Dazu habe ich folgende Zeilen in /etc/syslog-ng/syslog-ng.conf definiert:
Code: Alles auswählen
# FW log in eine extra datei
destination d_iptables { file("/var/log/firewall" perm(0640)); };
...
filter f_messages { level(info,notice,warn) and not filter (f_iptables) and
not facility(auth,authpriv,cron,daemon,mail,news); };
...
# Logs der FW
filter f_iptables { program ("iptables"); };
...
# fuer FW iptables
log { source(s_src); filter(f_iptables); destination(d_iptables); };
Code: Alles auswählen
filter f_iptables { match ("IN=xenbr0"); };