I'm in the process of working up a howto on installing and running ossec on a smeserver (
www.ossec.net). I've got it up and running, and having it look at various logs in /var/log.
I enabled logging on masq by doing the following:
db configuration setprop masq Logging most
/sbin/e-smith/expand-template /etc/rc.d/init.d/masq
/etc/rc.d/init.d/masq restart
which successfully dumps logs to /var/log/iptables
My question is about the format. On smeserver, many of the logs dump to a file called "current", and have a format different from what appears to be the defaults... For example, iptables logs normally look like this (on other linux systems):
Sep 21 11:45:17 lire kernel: Packet-drop IN=eth0 OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=48 TOS=0x00 PREC=0x00 TTL=113 ID=38365 DF PROTO=TCP SPT=3117 DPT=80 WINDOW=16384 RES=0x00 SYN URGP=0
Sep 21 11:45:20 lire kernel: Packet-drop IN=eth0 OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=48 TOS=0x00 PREC=0x00 TTL=113 ID=38478 DF PROTO=TCP SPT=3117 DPT=80 WINDOW=16384 RES=0x00 SYN URGP=0
Sep 21 11:45:26 lire kernel: Packet-drop IN=eth0 OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=48 TOS=0x00 PREC=0x00 TTL=113 ID=38680 DF PROTO=TCP SPT=3117 DPT=80 WINDOW=16384 RES=0x00 SYN URGP=0
Sep 21 11:52:46 lire kernel: Packet-drop IN=eth0 OUT=eth0 SRC=10.0.0.1 DST=10.0.0.3 LEN=48 TOS=0x00 PREC=0x00 TTL=113 ID=54122 DF PROTO=TCP SPT=4532 DPT=80 WINDOW=16384 RES=0x00 SYN URGP=0
Sep 21 11:52:49 lire kernel: Packet-drop IN=eth0 OUT=eth0 SRC=10.0.0.1 DST=10.0.0.3 LEN=48 TOS=0x00 PREC=0x00 TTL=113 ID=54222 DF PROTO=TCP SPT=4532 DPT=80 WINDOW=16384 RES=0x00 SYN URGP=0
Sep 21 11:52:55 lire kernel: Packet-drop IN=eth0 OUT=eth0 SRC=10.0.0.1 DST=10.0.0.3 LEN=48 TOS=0x00 PREC=0x00 TTL=113 ID=54443 DF PROTO=TCP SPT=4532 DPT=80 WINDOW=16384 RES=0x00 SYN URGP=0
on my smeserver 7.1.3, /var/log/iptables/current looks like this:
@40000000463246020c2ca16c Apr 27 14:50:32 gluon denylog: IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:15:c5:55:aa:9f:08:00 SRC=216.12.18.89 DST=255.255.255.255 LEN=29 TOS=00 PREC=0x00 TTL=128 ID=3256 PROTO=UDP SPT=4855 DPT=1434 LEN=9
@400000004632460a081ba154 Apr 27 14:50:40 gluon denylog: IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:15:c5:55:aa:9f:08:00 SRC=216.12.18.89 DST=255.255.255.255 LEN=29 TOS=00 PREC=0x00 TTL=128 ID=3674 PROTO=UDP SPT=4856 DPT=1434 LEN=9
@400000004632460b1bb1e994 Apr 27 14:50:41 gluon denylog: IN=eth1 OUT= MAC=01:00:5e:00:00:01:00:10:63:71:93:3d:08:00 SRC=216.12.21.176 DST=224.0.0.1 LEN=28 TOS=00 PREC=0x00 TTL=1 ID=0 PROTO=0
@400000004632461131929ed4 Apr 27 14:50:47 gluon denylog: IN=eth1 OUT= MAC=01:00:5e:00:00:01:00:13:46:40:a7:a3:08:00 SRC=216.12.15.233 DST=224.0.0.1 LEN=28 TOS=00 PREC=0x00 TTL=1 ID=18840 PROTO=0
@400000004632461209688be4 Apr 27 14:50:48 gluon denylog: IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:15:c5:55:aa:9f:08:00 SRC=216.12.18.89 DST=255.255.255.255 LEN=29 TOS=00 PREC=0x00 TTL=128 ID=4105 PROTO=UDP SPT=4857 DPT=1434 LEN=9
@400000004632461a0b44ba3c Apr 27 14:50:56 gluon denylog: IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:15:c5:55:aa:9f:08:00 SRC=216.12.18.89 DST=255.255.255.255 LEN=29 TOS=00 PREC=0x00 TTL=128 ID=4548 PROTO=UDP SPT=4858 DPT=1434 LEN=9
@40000000463246220d0a10ec Apr 27 14:51:04 gluon denylog: IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:15:c5:55:aa:9f:08:00 SRC=216.12.18.89 DST=255.255.255.255 LEN=29 TOS=00 PREC=0x00 TTL=128 ID=4973 PROTO=UDP SPT=4859 DPT=1434 LEN=9
@40000000463246231bc1d3cc Apr 27 14:51:05 gluon denylog: IN=eth1 OUT= MAC=01:00:5e:00:00:01:00:10:63:71:93:3d:08:00 SRC=216.12.21.176 DST=224.0.0.1 LEN=28 TOS=00 PREC=0x00 TTL=1 ID=0 PROTO=0
@40000000463246250b93d054 Apr 27 14:51:07 gluon denylog: IN=eth1 OUT= MAC=01:00:5e:00:00:01:00:13:46:40:a7:a3:08:00 SRC=216.12.15.233 DST=224.0.0.1 LEN=28 TOS=00 PREC=0x00 TTL=1 ID=18841 PROTO=0
@400000004632462a091bcf5c Apr 27 14:51:12 gluon denylog: IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:15:c5:55:aa:9f:08:00 SRC=216.12.18.89 DST=255.255.255.255 LEN=29 TOS=00 PREC=0x00 TTL=128 ID=5403 PROTO=UDP SPT=4860 DPT=1434 LEN=9
Can anyone point me to where I need to read up on how/why the logs are set up this way so I can see if the OSSEC folks can interpret these logfiles?
Are the smeserver log formats based on a standard? can they be changed?
Thanks.