Add a jail for proftpd

tags/0.0.1
Daniel Berteaud 12 years ago
parent 8131efc2ec
commit 5eb66234d7
  1. 2
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service10ssh
  2. 2
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service15dovecot
  3. 20
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service45ftp
  4. 2
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/90Recidive

@ -12,7 +12,7 @@ logpath = /var/log/sshd/current
action = smeserver-iptables[port="$port",protocol=tcp,bantime=$bantime]
EOF
$OUT .= " smeserver-sendmail[name=SSH,dest=$maildest]\n"
$OUT .= " smeserver-sendmail[name=\"SSH\",dest=$maildest]\n"
if ($mail eq 'enabled');
}

@ -18,7 +18,7 @@ logpath = /var/log/dovecot/current
action = smeserver-iptables[port="$port",protocol=tcp,bantime=$bantime]
EOF
$OUT .= " smeserver-sendmail[name=Dovecot,dest=$maildest]\n"
$OUT .= " smeserver-sendmail[name=\"Dovecot\",dest=$maildest]\n"
if ($mail eq 'enabled');
}

@ -0,0 +1,20 @@
{
my $port = $ftp{'TCPPort'} || '21';
my $status = $ftp{'status'} || 'disabled';
return "" if ($status ne 'enabled');
# add the data channel port
$port .= ',20';
$OUT .=<<"EOF";
[ftp]
enabled = true
filter = proftpd
logpath = /var/log/secure
action = smeserver-iptables[port="$port",protocol=tcp,bantime=$bantime]
EOF
$OUT .= " smeserver-sendmail[name=\"FTP\",dest=$maildest]\n"
if ($mail eq 'enabled');
}

@ -9,7 +9,7 @@ maxretry = 5
backend = polling
action = smeserver[bantime=604800]
{
$OUT .= " sendmail[name=Recidive,dest=$maildest]\n"
$OUT .= " sendmail[name=\"Recidive\",dest=$maildest]\n"
if ($mail eq 'enabled');
$OUT .= '';
}

Loading…
Cancel
Save