diff --git a/root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service35SOGo b/root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service35SOGo new file mode 100644 index 0000000..43a0642 --- /dev/null +++ b/root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service35SOGo @@ -0,0 +1,21 @@ +{ + +my $status = $sogod{'status'} || 'enabled'; +return "" if ($status ne 'enabled'); +my @ports = (); +push @ports, (${'httpd-e-smith'}{'TCPPort'} || '80'); +push @ports, ($modSSL{'TCPPort'} || '443'); +my $port = join (",", @ports); + +$OUT .=<<"EOF"; + +[sogo] +enabled = true +filter = sogo +port = $port +protocol = tcp +name = sogo +logpath = /var/log/sogo/sogo.log +EOF + +} diff --git a/root/etc/fail2ban/filter.d/sogo.conf b/root/etc/fail2ban/filter.d/sogo.conf new file mode 100644 index 0000000..730a379 --- /dev/null +++ b/root/etc/fail2ban/filter.d/sogo.conf @@ -0,0 +1,10 @@ +[INCLUDES] +before = common.conf + +[Definition] + +_daemon = sogod + +failregex = %(__prefix_line)s\s*SOGoRootPage Login from '' for user '.*' might not have worked \-.* + +ignoreregex =