I am very new to Perl scripts, so I may be missing
something important. Experts, please review this carefully.
in feed_db.pl,
The database connection and logfile are opened prior to
forking out into a child process that inserts data into
the db. I had to move these lines lower in the code
(after the block with call to fork()).
Without this, I would get an error "MySQL server has
gone away".
This change would mean forking prior to potential
errors in opening the log file, or connecting to the
database, but that should be easier to handle than the
error above.
Please comment,
thank you,
Polarpal
Logged In: YES
user_id=1164585
iptableslog: iptables_logger_v0.4.tar.gz
OS: redhat Fedora Core 2
1:Creation of the database
grant select right to a user used by the php interface:
mysql> grant select on iptables.* to iptables_user@localhost
identified by 'xx';
Query OK, 0 rows affected (0.00 sec)
mysql> grant create temporary tables on iptables.*
iptables_user@localhost identified by 'xx';
ERROR 1064: You have an error in your SQL syntax
near 'temporary table on iptables.* iptables_user@localhost
identified by 'jyong263'' at line 1
now, I have modification :
mysql> grant all on iptables_user@localhost identified
by 'jyong263';
2: Add the correct LOG rule to netfilter rules
you should check that the following king of lines apprears in
your logs (/var/log/syslog for example) :
Sep 24 21:33:56 nuage kernel: [IPTABLES DROP] : IN=ppp0
OUT= MAC= SRC=62.202.81.132 DST=193.253.186.217
LEN=48 TOS=0x00 PREC=0x00 TTL=111 ID=25302 DF
PROTO=TCP SPT=3795 DPT=12345 WINDOW=16384 RES=0x00
SYN URGP=0 OPT (0204058401010402)
but no the logs file
why?
3: Install database feeder
start the script as root (or any user that can read the
iptables logs) by :
/etc/init.d/iptablelog start
but system hints:
Starting iptables logfile analyzer: /etc/init.d/iptablelog: line
22: start-stop-daemon: command not found
now, the webpage come up but the log file is empty (Records
0 to 0 of 0) .
help me ,thanks