Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Hi guys I want to use a syslog-ng server for logging data from the firewall and I get Data from the Firewall in the file /var/firewall.log but now I want that the logs go to a database. For this I have install a mysql database and phpmyadmin on my ubuntu system.

What I must change in the syslog-ng.conf and what I must do with the database.

Here is my syslog-ng.conf:

source s_firewall {
  udp();
  };

destination d_firewall {
  file("/var/log/firewall.log");
  };

filter f_firewall {
  netmask("172.16.10.163/255.255.255.255");
  };

log {
  source(s_firewall);
  filter(f_firewall);
  destination(d_firewall);
  };

And this is in my log file:

...
Mar 14 15:47:09 172.16.10.163 kernel: arpresolve: can't allocate llinfo for 172.16.1.254
Mar 14 15:47:09 172.16.10.163 kernel: arpresolve: can't allocate llinfo for 172.16.1.254
Mar 14 15:47:10 172.16.10.163 pf: 00:00:34.029607 rule 47/0(match): pass in on le2: (tos 0x10, ttl 16, id 0, offset 0, flags [none], proto UDP (17), length 246)
Mar 14 15:47:10 172.16.10.163 pf: 00:00:34.029607 rule 47/0(match): pass in on le2: (tos 0x10, ttl 16, id 0, offset 0, flags [none], proto UDP (17), length 246)
...
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.