Configure fail2ban to use route instead of iptables to block connections

Fail2ban route command

Fail2ban uses iptables by default to block incoming connections when they exceed the max.  login retries. The iptables rules used by fail2ban might conflict with other firewall rules, so it might be necessary to reconfigure fail2ban to use the route command for blocking incoming connections. Fail2ban ban using route command To reconfigure fail2ban for using ... Read more

Redirect domains without www (e.g. domain.com) to www.domain.com with apache rewrite rules

Apache www redirect rule

If all your visitors shall access your website with a URL like www.domain.com and not without www, use the following apache rewrite rule for redirecting them. RewriteEngine On RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}$1 [L,R] The apache rewrite rule can be added in a .htaccess file in the website root directory or if you use ... Read more

Send all outgoing email trough one IP address in postfix

When a server has more than one IP address, then postfix will use all IP addresses randomly to send out emails. This can cause your emails to be listed as SPAM on other servers because the sending IP does not match the reverse IP of the server hostname. The solution is to bind postfix to ... Read more

How to enable DKIM email signatures in amavisd-new and ISPConfig 3.0

NOTE: This post is about ISPConfig 3.0 and not 3.1 and newer. ISPConfig 3.1 and newer has DKIM support builtin, you can simply enable DKIM in ISPConfig 3.1 GUI now for the mail domain. DKIM is a system to verify the sender and integrity of emails. ISPConfig 3 uses amavisd-new as content filter for spam ... Read more

How to disable Apache mod_security for a website in ISPConfig 3.

If you use mod_security on your server you might encounter that a website script is not compatible with mod_security. To disable mod_security (v2) for a website, add the following code into the apache directives field: <IfModule mod_security2.c&gt SecRuleEngine Off </IfModule&gt For the older mod_security 1 version, use these configuration directives: <IfModule mod_security.c> SecFilterEngine Off </IfModule> ... Read more

Where is the ISPConfig 3 configuration file?

ISPConfig 3 has two different configuration files, one for the server part and one for the interface. ISPConfig 3 Interface The config file location is: /usr/local/ispconfig/interface/lib/config.inc.php ISPConfig 3 Server The config file location is: /usr/local/ispconfig/server/lib/config.inc.php The MySQL root password that is used to create new MySQL databases only is stored in the file: /usr/local/ispconfig/server/lib/mysql_clientdb.conf