LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   iptables log to MySQL (http://www.linuxquestions.org/questions/linux-server-73/iptables-log-to-mysql-800438/)

Blue_Ice 04-06-2010 06:23 PM

iptables log to MySQL
 
Hi all,

Does anyone know how to make iptables log to a MySQL database?
If you do, can you tell me where I can find a good tutorial?

I hope that I didn't ask a question that I could have found easily using Google. I didn't find much or at least not very recent.

I am using CentOS 5.4, iptabels 1.3.5 and MySQL 5.0.77.

TIA,
Arjan.

TB0ne 04-06-2010 06:53 PM

Quote:

Originally Posted by Blue_Ice (Post 3926732)
Hi all,
Does anyone know how to make iptables log to a MySQL database?
If you do, can you tell me where I can find a good tutorial?

I hope that I didn't ask a question that I could have found easily using Google. I didn't find much or at least not very recent.

I am using CentOS 5.4, iptabels 1.3.5 and MySQL 5.0.77.

Try this:
http://linuxgazette.net/121/anonymous.html

A bit older, but still relevant. The ulogd daemon is what you're after. Once that's done, a small bit of configuring can send anything that 'logs' to the daemon, and from there, into MySQL

Blue_Ice 04-19-2010 04:56 AM

Thnx for your help.

A friend suggested to use syslog-ng, which works just fine.


All times are GMT -5. The time now is 05:08 PM.