Mehr Sicherheit durch fail2ban: Unterschied zwischen den Versionen

Zeile 174: Zeile 174:
port = http,https
port = http,https
filter = apache-nohome
filter = apache-nohome
logpath = /var/log/apache2/*error.log
logpath = /var/log/apache*/*error.log
maxretry = 5
maxretry = 5


Zeile 181: Zeile 181:
port = http,https
port = http,https
filter = apache-badbots
filter = apache-badbots
logpath = /var/log/apache2/*access.log
logpath = /var/log/apache*/*access.log
maxretry = 3
maxretry = 3
[apache-404block]
enabled = true
port = http,https
filter = apache-404block
logpath = /var/log/apache*/*access.log
maxretry = 5
</pre>
</pre>


Zeile 214: Zeile 221:
ignoreregex =
ignoreregex =


</pre>
''/etc/fail2ban/filter.d/apache-404block.conf''
<pre>
[Definition]
failregex = - - \[.*\] "GET /.* HTTP/1\.[01]" 404 [0-9]+.*$
ignoreregex =
</pre>
</pre>


Zeile 294: Zeile 307:
logpath  = /var/log/mail.log
logpath  = /var/log/mail.log
</pre>
</pre>
== Regex Testen ==
== Regex Testen ==
<source lang=bash>
<source lang=bash>