LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-06-2010, 06:23 PM   #1
Blue_Ice
Member
 
Registered: Jul 2006
Location: Belgium
Distribution: Debian, Fedora, CentOS, Windows
Posts: 352

Rep: Reputation: Disabled
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.
 
Old 04-06-2010, 06:53 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,963

Rep: Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672
Quote:
Originally Posted by Blue_Ice View Post
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
 
Old 04-19-2010, 04:56 AM   #3
Blue_Ice
Member
 
Registered: Jul 2006
Location: Belgium
Distribution: Debian, Fedora, CentOS, Windows
Posts: 352

Original Poster
Rep: Reputation: Disabled
Thnx for your help.

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


Reply

Tags
iptables, mysql


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash Ujjain Linux - Newbie 2 04-24-2009 03:21 PM
Iptables Log Analyzer no logs in mysql db! abcampa Linux - Software 1 12-11-2008 03:53 AM
Firewall log file, how to make several different log files with IPTables? newtovanilla Linux - Newbie 5 11-28-2008 01:39 PM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 05:03 PM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 09:38 PM


All times are GMT -5. The time now is 10:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration