Add systemD/journalD sftpgo Fail2ban configuration

This commit is contained in:
RIVIERE Fabien
2019-12-30 23:46:17 +01:00
committed by drakkan
parent c7e55db4e0
commit 8e0ca88421
3 changed files with 28 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
[INCLUDES]
before = common.conf
[DEFAULT]
_daemon = sftpgo
[Definition]
# By default, first authenticate method is public_key and must be excluded from the filter to avoid false positives failed attemps
failregex = ^.*"sender":"connection_failed","client_ip":"<HOST>","username":".*","login_type":"password".*"}$
ignoreregex =
[Init]
journalmatch = _SYSTEMD_UNIT=sftpgo.service + _COMM=sftpgo

View File

@@ -0,0 +1,10 @@
[sftpgo]
enabled = true
port = 2022
filter = sftpgo
action = iptables-allports[name=sftpgo]
logpath =
backend = systemd
maxretry = 5
bantime = 600
findtime = 86400