Linux

HAProxy: redirect http traffic to https

Within HAProxy it is possible to redirect all http traffic to https. It is sufficient to add the following rule within the frontend section: frontend incoming80 bind 10.1.1.13:80 redirect scheme https if !{ ssl_fc }

Read More

HAProxy: configure transparent proxy

If you configure HAProxy by default, the backends will receive the IP address of the HAProxy as incoming IP address. Some applications (or people) don’t want that. It is possible to configure haproxy as transparent proxy, so that the IP…

Read More

Linux: increase inodes on EXT4 file system

If you have a file system with a lot of small files, it it possible that you are running out of inodes. Unfortunately it is not possible to increase the number of inodes on the fly. In order achieve this,…

Read More

ModSecurity: Mod Security rules for wordpress/joomla/drupal

You can use the following mod_security rules for wordpress/joomla/drupal ## Rules for the CWP ## SecRuleRemoveById 910006SecRuleRemoveById 950000SecRuleRemoveById 950001SecRuleRemoveById 950005SecRuleRemoveById 950006SecRuleRemoveById 950117SecRuleRemoveById 950907SecRuleRemoveById 958039SecRuleRemoveById 958051SecRuleRemoveById 958291SecRuleRemoveById 959006SecRuleRemoveById 959151SecRuleRemoveById 960008SecRuleRemoveById 960010 SecRuleRemoveById 960011 SecRuleRemoveById 960012 SecRuleRemoveById 960035 SecRuleRemoveById 960335 SecRuleRemoveById 960904 SecRuleRemoveById 960915 SecRuleRemoveById 970003 SecRuleRemoveById 970015 SecRuleRemoveById 970903 SecRuleRemoveById 973301 SecRuleRemoveById…

Read More

Linux: run commandline internet speed test

There are different possibilities to run internet speed tests from Linux (and Unix based systems) command line. Personally I don’t always want to install extra applications on the servers.Because of that, I use the following command line. The only thing…

Read More

Linux: Clear systemd log

You can use the following command, as superuser, to clear the systemd logs: Keep the last 7 days: journalctl –vacuum-time=7d Keep the last 100Mb: journalctl –vacuum-size=100M

Read More

Postfix: Clear postfix mail queue

Is your postfix mail queue full of spam? You are not the only one 🙂 In that case it could be interesting to clear your queue, before the spam gets send out. In order to remove all mail from the…

Read More

Fail2ban: show active jails

Fail2ban is a daemon that can be used to monitor the logs of services and ban clients that based on incorrect behaviour. A must have on your Linux system. But sometimes you can forget enabling the correct jails, therefore always…

Read More