Add LL::NG filter and jail and default to disabled for SOGo jail

tags/0.0.1
Daniel Berteaud 12 years ago
parent 3285432916
commit 5240cfb528
  1. 4
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service35SOGo
  2. 22
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service40LemonLDAPNG
  3. 11
      root/etc/fail2ban/filter.d/lemonldap-ng.conf

@ -1,6 +1,6 @@
{ {
my $status = $sogod{'status'} || 'enabled'; my $status = $sogod{'status'} || 'disabled';
return "" if ($status ne 'enabled'); return "" if ($status ne 'enabled');
my @ports = (); my @ports = ();
push @ports, (${'httpd-e-smith'}{'TCPPort'} || '80'); push @ports, (${'httpd-e-smith'}{'TCPPort'} || '80');
@ -16,7 +16,7 @@ logpath = /var/log/sogo/sogo.log
action = smeserver[port="$port",protocol=tcp,bantime=$bantime] action = smeserver[port="$port",protocol=tcp,bantime=$bantime]
EOF EOF
$OUT .= " sendmail[name=SOGo,dest=$maildest]\n" $OUT .= " sendmail[name="SOGo",dest=$maildest]\n"
if ($mail eq 'enabled'); if ($mail eq 'enabled');
} }

@ -0,0 +1,22 @@
{
my $status = ${'lemonldap-ng'}{'status'} || 'disabled';
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 = lemonldap-ng
logpath = /var/log/messages
action = smeserver[port="$port",protocol=tcp,bantime=$bantime]
EOF
$OUT .= " sendmail[name="LemonLDAP::NG",dest=$maildest]\n"
if ($mail eq 'enabled');
}

@ -0,0 +1,11 @@
[INCLUDES]
before = common.conf
[Definition]
_daemon = lemonldap\-ng
failregex = ^\s*%(__prefix_line)s\s*Lemonldap::NG : .* was not found in LDAP directory \(<HOST>\)\s*$
^\s*%(__prefix_line)s\s*Lemonldap::NG : Bad password for .* \(<HOST>\)\s*$
ignoreregex =
Loading…
Cancel
Save