Add Ejabberd filter and jail

tags/0.0.1
Daniel Berteaud 12 years ago
parent 1f8d32a6e0
commit 2da82e6d45
  1. 20
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service50Ejabberd
  2. 4
      root/etc/fail2ban/filter.d/ejabberd.conf

@ -0,0 +1,20 @@
{
my $status = $ejabberd{'status'} || 'disabled';
return "" if ($status ne 'enabled');
my $port = $ejabberd{'TCPPorts'} || '5222,5223,5269';
$OUT .=<<"EOF";
[ejabberd]
enabled = true
filter = ejabberd
logpath = /var/log/ejabberd.run/current
action = smeserver-iptables[port="$port",protocol=tcp,bantime=$bantime]
EOF
$OUT .= " smeserver-sendmail[name=\"Ejabberd\",dest=$maildest]\n"
if ($mail eq 'enabled');
}

@ -0,0 +1,4 @@
[Definition]
failregex = Failed authentication for .*@.* from IP <HOST>
ignoreregex =
Loading…
Cancel
Save