Fail2ban ssh: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 6: | Zeile 6: | ||
*wget https://xinux.de/downloads/bad-passwords | *wget https://xinux.de/downloads/bad-passwords | ||
| − | = | + | =Brute Force auf den Rechner= |
| − | *hydra -l | + | *hydra -l gast -P bad-passwords 10.00.1''xx''.4 sftp |
=sshd in fail2ban aktivieren= | =sshd in fail2ban aktivieren= | ||
Version vom 7. August 2023, 21:00 Uhr
Hydra installieren (Hacking & Security Seite 136)
- apt update
- apt install hydra
Passwordliste laden
Brute Force auf den Rechner
- hydra -l gast -P bad-passwords 10.00.1xx.4 sftp
sshd in fail2ban aktivieren
- echo -e "[sshd]\nenabled = true\n" >> /etc/fail2ban/jail.local
fail2ban neustarten
- systemctl restart fail2ban
Status checken
- fail2ban-client status sshd
Status for the jail: sshd |- Filter | |- Currently failed: 1 | |- Total failed: 14 | `- File list: /var/log/auth.log `- Actions |- Currently banned: 1 |- Total banned: 1 `- Banned IP list: 172.31.31.1
Alles unbannen
- fail2ban-client unban --all