updates to fail2ban configs
This commit is contained in:
@@ -8,45 +8,42 @@
|
||||
# sudo fail2ban-client status nginx-scan
|
||||
|
||||
[DEFAULT]
|
||||
# Ban IPs using UFW (already configured on this server)
|
||||
banaction = ufw
|
||||
|
||||
[nginx-scan]
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-scan
|
||||
logpath = /var/log/nginx/access.log
|
||||
|
||||
# Ban if 20 errors in 60 seconds
|
||||
maxretry = 20
|
||||
findtime = 60
|
||||
|
||||
# Ban for 1 hour
|
||||
bantime = 3600
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-scan
|
||||
logpath = /var/log/nginx/access.log
|
||||
# Ban after 10 errors in 30 seconds
|
||||
maxretry = 10
|
||||
findtime = 30
|
||||
# Ban for 24 hours
|
||||
bantime = 86400
|
||||
|
||||
[nginx-badbots]
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-badbots
|
||||
logpath = /var/log/nginx/access.log
|
||||
maxretry = 2
|
||||
findtime = 86400
|
||||
bantime = 86400
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-badbots
|
||||
logpath = /var/log/nginx/access.log
|
||||
maxretry = 2
|
||||
findtime = 86400
|
||||
bantime = 86400
|
||||
|
||||
[nginx-noscript]
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-noscript
|
||||
logpath = /var/log/nginx/access.log
|
||||
maxretry = 6
|
||||
findtime = 60
|
||||
bantime = 3600
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-noscript
|
||||
logpath = /var/log/nginx/access.log
|
||||
maxretry = 6
|
||||
findtime = 60
|
||||
bantime = 86400
|
||||
|
||||
[sshd]
|
||||
enabled = true
|
||||
port = ssh
|
||||
filter = sshd
|
||||
logpath = /var/log/auth.log
|
||||
maxretry = 5
|
||||
findtime = 60
|
||||
bantime = 3600
|
||||
enabled = true
|
||||
port = ssh
|
||||
filter = sshd
|
||||
logpath = /var/log/auth.log
|
||||
maxretry = 5
|
||||
findtime = 60
|
||||
bantime = 86400
|
||||
|
||||
Reference in New Issue
Block a user