Skip to content

Commit 5eb43f4

Browse files
author
latham
committed
Fail2ban config start: The Chicken first
1 parent 3a74116 commit 5eb43f4

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public function find_installed_apps() {
133133
if(is_installed('squid')) $conf['squid']['installed'] = true;
134134
if(is_installed('nginx')) $conf['nginx']['installed'] = true;
135135
if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true;
136+
if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true;
136137
if(is_dir("/etc/Bastille")) $conf['bastille']['installed'] = true;
137138

138139
if ($conf['services']['web'] && $conf['apache']['installed'] && is_file($conf['apache']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")) $this->ispconfig_interface_installed = true;
@@ -1898,4 +1899,4 @@ protected function insert_db_credentials($tContents) {
18981899
}
18991900
}
19001901

1901-
?>
1902+
?>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[Definition]
2+
failregex = (?: pop3-login|imap-login): .*(?:Authentication failure|Aborted login \(auth failed|Aborted login \(tried to use disabled|Disconnected \(auth failed).*rip=(?P<host>\S*),.*
3+
ignoreregex =
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[dovecot-pop3imap]
2+
enabled = true
3+
filter = dovecot-pop3imap
4+
action = iptables-multiport[name=dovecot-pop3imap, port="pop3,pop3s,imap,imaps", protocol=tcp]
5+
# optionaly mail notification # mail[name=dovecot-pop3imap, dest=root@domain] # see /etc/fail2ban/action.d/ or Fail2Ban doc
6+
logpath = /var/log/maillog
7+
maxretry = 20
8+
findtime = 1200
9+
bantime = 1200
10+

0 commit comments

Comments
 (0)