Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
fail2ban [31.01.2024] hochrath [Beste Vorgehensweise] |
fail2ban [31.01.2024] (aktuell) hochrath [Quellen] |
||
---|---|---|---|
Zeile 226: | Zeile 226: | ||
</ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | Nun kann man über die Log-Files sehr schön den Verlauf bei einem fehlerhaften Zugriff beobachten: | ||
+ | **service fail2ban status** | ||
+ | < | ||
+ | root@raspberrypi3:/ | ||
+ | ● fail2ban.service - Fail2Ban Service | ||
+ | | ||
+ | | ||
+ | Docs: man: | ||
+ | Process: 23835 ExecStartPre=/ | ||
+ | Main PID: 23836 (fail2ban-server) | ||
+ | Tasks: 7 (limit: 1595) | ||
+ | CPU: 5.115s | ||
+ | | ||
+ | | ||
+ | |||
+ | Jan 31 15:32:26 raspberrypi3 systemd[1]: Starting Fail2Ban Service... | ||
+ | Jan 31 15:32:26 raspberrypi3 systemd[1]: Started Fail2Ban Service. | ||
+ | Jan 31 15:32:27 raspberrypi3 fail2ban-server[23836]: | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | **iptables -L** | ||
+ | < | ||
+ | root@raspberrypi3:/ | ||
+ | Chain INPUT (policy ACCEPT) | ||
+ | target | ||
+ | f2b-apache404 | ||
+ | |||
+ | Chain FORWARD (policy ACCEPT) | ||
+ | target | ||
+ | |||
+ | Chain OUTPUT (policy ACCEPT) | ||
+ | target | ||
+ | |||
+ | Chain f2b-apache404 (1 references) | ||
+ | target | ||
+ | RETURN | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | **fail2ban-client status apache404** | ||
+ | < | ||
+ | root@raspberrypi3:/ | ||
+ | Status for the jail: apache404 | ||
+ | |- Filter | ||
+ | | |- Currently failed: 1 | ||
+ | | |- Total failed: | ||
+ | | `- File list: / | ||
+ | `- Actions | ||
+ | |- Currently banned: 0 | ||
+ | |- Total banned: | ||
+ | `- Banned IP list: | ||
+ | |||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | \\ | ||
+ | nun die Webseite nach fehlenden Seiten abfragen: | ||
+ | \\ | ||
+ | **tail -f / | ||
+ | < | ||
+ | 2024-01-31 16: | ||
+ | 2024-01-31 16: | ||
+ | 2024-01-31 16: | ||
+ | |||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | **fail2ban-client status apache404** | ||
+ | < | ||
+ | root@raspberrypi3:/ | ||
+ | Status for the jail: apache404 | ||
+ | |- Filter | ||
+ | | |- Currently failed: 0 | ||
+ | | |- Total failed: | ||
+ | | `- File list: / | ||
+ | `- Actions | ||
+ | |- Currently banned: 1 | ||
+ | |- Total banned: | ||
+ | `- Banned IP list: | ||
+ | |||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | **iptables -L** | ||
+ | < | ||
+ | root@raspberrypi3:/ | ||
+ | Chain INPUT (policy ACCEPT) | ||
+ | target | ||
+ | f2b-apache404 | ||
+ | |||
+ | Chain FORWARD (policy ACCEPT) | ||
+ | target | ||
+ | |||
+ | Chain OUTPUT (policy ACCEPT) | ||
+ | target | ||
+ | |||
+ | Chain f2b-apache404 (1 references) | ||
+ | target | ||
+ | REJECT | ||
+ | RETURN | ||
+ | |||
+ | </ | ||
Zeile 233: | Zeile 338: | ||
+ | \\ | ||
+ | \\ | ||
==== Quellen ==== | ==== Quellen ==== | ||
https:// | https:// | ||
https:// | https:// |