scheitere an fail2ban

>|Sh4d0w|<

Commander
Registriert
Jan. 2009
Beiträge
2.540
Hallo zusammen,
ich scheitere gerade kläglich an fail2ban, während ein anders auf einem pihole läuft.

debian 13.5 (proxmox vm).

jail.local:
Code:
[sshd]

# To use more aggressive sshd modes set filter parameter "mode" in jail.local:
# normal (default), ddos, extra or aggressive (combines all).
# See "tests/files/logs/sshd" or "filter.d/sshd.conf" for usage example and details.
#mode   = normal
enabled = true # hinzugefügt
port    = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s  #ebenfalls schon systemd versucht

danach:
systemctl restart fail2ban
systemctl enable fail2ban

Ich kann mich jedes Mal 6x falsch anmelden, dann werde ich gekickt, aber nicht gebannt. Die Default maxretry unter [Default] = 5, findtime = 10m, bantime = 10m. Wie gesagt, alles Standard.

Ebenso habe ich den logpath auf systemd geändert. Oder die maxretry, findtime, bantime Parameter nochmals unter [sshd] hinzugefügt, obwohl er das eigentlich global erhält.

Auf dem Gerät ist nur noch ein pihole installiert (kein Docker)
Hat jemand eine Idee?
 
Zeigt er denn per fail2ban-client status sshd auch keinen Ban an?
 
  • Gefällt mir
Reaktionen: madmax2010
Code:
root@pihole:/home/adam# fail2ban-client status sshd
Status for the jail: sshd
|- Filter
|  |- Currently failed: 1
|  |- Total failed:     7
|  `- Journal matches:  _SYSTEMD_UNIT=ssh.service + _COMM=sshd
`- Actions
   |- Currently banned: 1
   |- Total banned:     2
   `- Banned IP list:    192.168.0.184

Immer beim 6. Versuch werde ich gekickt mit der Meldung "Remote side sent disconnect message type 2 (protocol error) "Too many athentication failures". Ein Login per ssh ist trotz ban möglich

Code:
root@pihole:/home/adam# fail2ban-client get sshd actions
The jail sshd has the following actions:
iptables-multiport
 
Zuletzt bearbeitet:
>|Sh4d0w|< schrieb:
Ein Login per ssh ist trotz ban möglich
Ist iptables denn in Verwendung oder irgendwas anderes wie ufw oder nftables?
 
  • Gefällt mir
Reaktionen: madmax2010
Zurück
Oben