Fail2ban: Difference between revisions

From Server STB
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
           telegram
           telegram


[apache-overflows]
[apache-overflows]


enabled  = true
enabled  = true
port    = http,https
port    = http,https
filter  = apache-overflows
filter  = apache-overflows
logpath  = /var/log/apache*/*error.log
logpath  = /var/log/apache*/*error.log
maxretry = 2
maxretry = 2


[apache-badbots]
[apache-badbots]


enabled  = true
enabled  = true
port    = http,https
port    = http,https
filter  = apache-badbots
filter  = apache-badbots
logpath  = /var/log/apache*/*error.log
logpath  = /var/log/apache*/*error.log
maxretry = 2
maxretry = 2


[apache-nohome]
[apache-nohome]


enabled  = true
enabled  = true
port    = http,https
port    = http,https
filter  = apache-nohome
filter  = apache-nohome
logpath  = /var/log/apache*/*error.log
logpath  = /var/log/apache*/*error.log
maxretry = 2
maxretry = 2


[php-url-fopen]
[php-url-fopen]


enabled = true
enabled = true
port    = http,https
port    = http,https
filter  = php-url-fopen
filter  = php-url-fopen
logpath = /var/log/apache*/*access.log
logpath = /var/log/apache*/*access.log




https://www.digitalocean.com/community/tutorials/how-to-protect-an-apache-server-with-fail2ban-on-ubuntu-14-04
https://www.digitalocean.com/community/tutorials/how-to-protect-an-apache-server-with-fail2ban-on-ubuntu-14-04

Revision as of 06:50, 25 June 2024

jail.local

[sshd]
enabled = true
port    = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
maxretry = 10
bantime = -1
action  = iptables[name=SSH, port=22, protocol=tcp]
         telegram
[apache-overflows]
enabled  = true
port     = http,https
filter   = apache-overflows
logpath  = /var/log/apache*/*error.log
maxretry = 2
[apache-badbots]
enabled  = true
port     = http,https
filter   = apache-badbots
logpath  = /var/log/apache*/*error.log
maxretry = 2
[apache-nohome]
enabled  = true
port     = http,https
filter   = apache-nohome
logpath  = /var/log/apache*/*error.log
maxretry = 2
[php-url-fopen]
enabled = true
port    = http,https
filter  = php-url-fopen
logpath = /var/log/apache*/*access.log


https://www.digitalocean.com/community/tutorials/how-to-protect-an-apache-server-with-fail2ban-on-ubuntu-14-04