mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 20:41:53 -07:00
Adding ProFTPD jail rule to Fail2Ban
This commit is contained in:
parent
ff7bc2baa5
commit
fa8dd64c5a
2 changed files with 42 additions and 1 deletions
|
@ -1690,6 +1690,20 @@ if [ "$fail2ban" = 'yes' ]; then
|
|||
chmod 640 /var/log/auth.log
|
||||
chown root:adm /var/log/auth.log
|
||||
fi
|
||||
if [ "$proftpd" = 'yes' ]; then
|
||||
cat <<EOF >> /etc/fail2ban/jail.local
|
||||
|
||||
[proftpd]
|
||||
enabled = true
|
||||
filter = proftpd
|
||||
action = vesta[name=FTP]
|
||||
port = ftp,ftp-data,ftps,ftps-data
|
||||
logpath = %(proftpd_log)s
|
||||
backend = %(proftpd_backend)s
|
||||
maxretry = 5
|
||||
EOF
|
||||
fi
|
||||
|
||||
#update-rc.d fail2ban defaults
|
||||
currentservice='fail2ban'
|
||||
ensure_startup $currentservice
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue