Author Archives: virgil

Counting IP’s on system logs with Python

This is an example script on how to count IP’s on any log. This should be run like : python /path/to/log and the output will be like: IP: – COUNT: 63 IP: – COUNT: 54 IP: … Continue reading

Posted in Misc | Tagged , , , , , , , , , | Leave a comment

Apache cookie authentication

There’s a module that let’s you authenticate via any auth method (basic auth, ldap, etc…) to specific locations, you can also set an expiration time on the cookie, so when the time expire the user will be redirected to the … Continue reading

Posted in Apache, Linux, Misc, PHP, Security | Leave a comment

Installing ModSecurity with Nginx and OWASP CRS on Debian Stretch

First we have to install all dependencies including ModSecurity and Nginx. It’s recommended to install Nginx from the stable branch of the official repositories, this way you can update nginx without compiling it everytime however we’ll need to compile the … Continue reading

Posted in Debian, Linux, ModSecurity, Nginx, Proxy, Security, Unix | Tagged , , , , , , | Leave a comment

Docker save, load, import, export, commit.

When I came across with the command docker export/import I was really confused as of what is it for. I usually just save my images with docker save. The documentation just says docker-export – Export a container’s filesystem as a … Continue reading

Posted in Containers, Docker, Unix, Virtualization | 2 Comments

Percona XtraDB Cluster in Docker Swarm.

I have the next scenario where I needed to setup a MySQL Percona XtraDB Cluster on containers on 3 different servers.

Posted in Cluster, Containers, Databases, Docker, HA, Linux, Misc, MySQL, Percona, Percona XtraDB | Leave a comment

Incorrect definition of table mysql.proc

I recently upgraded my server from Debian 8 to Debian 9, I also upgraded MySQL5.5 (Percona)  to MariaDB 10, everything seemed fine until I noticed the database was down, and i just couldn’t bring it up, it just kept dying, … Continue reading

Posted in Databases, Debian, Linux, MySQL, Systemd, Unix | 4 Comments

Proxmox 3, starting worker failed: Unable to parse worker upid error

This is a bug in Proxmox 3, when you have a high uptime, usually more than 365 days, and you want to initiate an instance (VM), you get the error:

Posted in Misc | Leave a comment

Installing HaProxy in Debian 8

there’s a package in debian 8 repository however it’s not the newest version (1.5), so in order to have the most recent release (1.6.5) we are going to compile it from source. You can download it from the official page … Continue reading

Posted in Debian, HaProxy, Linux, Load balancing, Systemd, Unix | Leave a comment

Extract key from tomcat keystore

If you have several flavours of web servers (tomcat, apache, nginx), and want to add SSL Certificates to them you might have noticed that you need different kind of certificates for your web servers, you can however, add SSL Certificates … Continue reading

Posted in Apache, Nginx, SSL, tomcat | Leave a comment

Generate SSL Certificate for Tomcat 6.X, 7.X, 8.X

There are two ways of configuring tomcat, depending on the connector you are using, in this case we’ll configure tomcat with the default connector which needs a keystore for the certs. You’ll need to have Java installed. The steps to … Continue reading

Posted in SSL, tomcat | Leave a comment