![]() In the logfile unfortunately with “ Mar“. The problem is the March, in German actually with “ Mär” abbreviated. To convert the monthly abbreviations in the iptables log into the correct numbers, a hashtable is used. My $pid_file = "/var/run/iptablelog.pid" īecause of my German environment there was a problem in the feed_db.pl Modify the config section in /usr/local/bin/feed_db.pl my $dsn = 'DBI:mysql:iptables:192.168.1.119' Install prerequisites: perl -MCPAN -e 'install DBD::Pg'Īlternatively: apt-get install libdbd-mysql-perlĪll necessary files are in the scripts directory. Copy them into the appropriate directories: cp feed_db.pl /usr/local/bin/ $db_name="iptables" Firewall Install database feeder. Restart service service mysql restart Install the web interfaceĬopy all files from web directory: cp -R web/* /var/# Host of the MySQL database | interface_in | varchar(50) | NO | | | |ġ1 rows in set (0.00 sec) Allow remote accessĮdit /etc/mysql/my.cnf and change the ip address bind-address = 192.168.1.119 | chain | varchar(50) | NO | MUL | DROP | | | Field | Type | Null | Key | Default | Extra | In the tar archive is in the folder sql a script for the import.First, the keyword TYPE must be replaced by ENGINE in the file db.sql! cat db.sql | mysql -u root -p iptablesĬheck whether everything has been created correctly mysql -u root -p iptables Mysql> grant create temporary tables on iptables.* TO iptables_www identified by '1q2w3e4r' Ĭreate user for feeder: grant insert on iptables.logs to iptables_feeder identified by '1q2w3e4r' Fill database with the necessary tables and data I work with 2 users, one for the web server and one for the feed_db.pl.Ĭreate user for webinterface mysql> grant select,insert on iptables.* to iptables_www identified by '1q2w3e4r' Type '\c' to clear the current input statement. Other names may be trademarks of their respective Oracle is a registered trademark of Oracle Corporation and/or itsĪffiliates. Commands end with or \g.Ĭopyright (c) 2000, 2016, Oracle and/or its affiliates. Go to If everything is installed correctly, the following page should be displayed: To test php a simple php.info script is sufficient vim /var/www/html/info.php Management Server Installation and preparation of mysql, apache and php apt-get install mysql-server mysql-client This version was developed by Daniel Tarbuck. I will look at this version later and make a comparison. In the following guide I have used the version 0.4. ![]() Thus the logging of the firewalls can be centralized. The database can run on the firewall, but I would like to install it on my management server on which the fwbuilder runs. In the search for a clear log display for iptables I found the page from Gerald Garcia.Įssentially it consists of a perl script, which writes new entries in the iptables log into a sql database.
0 Comments
Leave a Reply. |