Proxylizer/Getting Started
Download
TODO
Install
All the examples assume that Proxylizer server IP address is 10.1.1.2;
The installation includes steps for setting up the following:
- Web page scripts
- Permissions for directories
- Syslog deamon
- Web server with PHP and PHP-Pear
- MySQL database server
- MySQL user created for proxylizer database
- Scripts/daemons forwarding records from syslog to MySQL
- Scheduled scripts for report generation
Mikrotik router
Web-proxy log export to remote host
TODO
Proxylizer server
All the exemples assume that web page root directory is "/var/www/proxylizer", webserver user is "www-data", Proxylizer server system user is "proxylizer" and .pipe file destination/name is "/home/proxylizer/mysql.pipe".
Web page scripts
TODO
Permissions for directories
Open console. Change ownership of web page root directory for web server user
"chown www-data:proxylizer /var/www/proxylizer -R"
Set permisions to read files for webserver user
"find -type f -exec chmod u+r {} \;"
Set permisions to read and execute directories for webserver user
"find -type d -exec chmod ug+rwx {} \;"
Set permisions to execute 3 shell script files for webserver user group.
"chmod g+x checkwebproxy.sh mail_send.php webproxylogtomysql.php";
Syslog deamon
Install syslog-ng deamon.
"apt-get install syslog-ng"
WARNING : If you have Ubuntu OS syslog-ng can conflic with ubuntu-minimal package! You can remove this package. Change syslog-ng config to recieve logs from Mikroutik router and put them into mysql.pipe file. Open /etc/syslog-ng/syslog-ng.conf and add these lines next to "#destinations"
"destination d_mysql { #file("/var/log/proxy.log"); pipe("/home/proxylizer/mysql.pipe" template("$HOST $YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $MSG\n") template-escape(yes)); }; log { source(net); destination(d_mysql); };"
And this line next to "#sources"
"source net { udp(); }"
Web server with PHP and PHP-Pear
Install webserver (we recomend Apache2), PHP5, PHP5-cli and PHP-Pear : DB, Mail, Mail_Mime and Net_SMTP packages.
"apt-get install apache2.2-common php5-common php5-cli php-pear" "pear install DB Mail Mail_Mime Net_SMTP"
MySQL database server
TODO
MySQL user created for proxylizer database
TODO
Scripts/daemons forwarding records from syslog to MySQL
TODO
Scheduled scripts for report generation
TODO