Barnyard2 not log mysql

87 views
Skip to first unread message

Ozgur Karatas

unread,
May 22, 2013, 1:02:47 AM5/22/13
to barnyar...@googlegroups.com
Hello all,

I install snort and I install barnyard2. I trying to snort and barnyard2 but barnyard2 not write log to mysql.

$ snort -N -d -D --daq ipq -Q -c /etc/snort/snort.conf
$ /usr/local/bin/barnyard2 -c /etc/snort/barnyard2.conf -d /var/log/snort -f alert

$ cat /etc/snort/rules/local.rules 
alert icmp any any -> $HOME_NET any (msg:"ICMP test"; sid:10000001;)

snort.conf:

# unified2 
# Recommended for most installs
output unified2: filename snort.u2, limit 128

barnyard2.conf:

input unified2
output alert_fast: stdout
output database: log, mysql, user=snort password=test123 dbname=snort host=localhost

ls /var/log/snort/
alert  barnyard.waldo

ls /var/log/barnyard2/
empty

tail -f /var/log/snort/alert

[**] [1:10000001:0] ICMP test [**]
[Priority: 0] 
05/22-09:55:47.334925 187.10.132.44 -> 10.0.0.10
ICMP TTL:107 TOS:0x20 ID:28583 IpLen:20 DgmLen:56
Type:3  Code:3  DESTINATION UNREACHABLE: PORT UNREACHABLE
** ORIGINAL DATAGRAM DUMP:
UDP TTL:111 TOS:0x0 ID:17611 IpLen:20 DgmLen:131
Len: 103  Csum: 0
** END OF DUMP

mysql> select * from sensor;
+-----+------------------------+-----------+--------+--------+----------+----------+
| sid | hostname               | interface | filter | detail | encoding | last_cid |
+-----+------------------------+-----------+--------+--------+----------+----------+
|   1 | snort:br0 | br0       | NULL   |      1 |        0 |        1 |
+-----+------------------------+-----------+--------+--------+----------+----------+
1 row in set (0.00 sec)

select * from event;
Empty set (0.00 sec)

What is the problem? Please help me.

Regards

Ozgur
Reply all
Reply to author
Forward
0 new messages