20 lines
377 B
Bash
20 lines
377 B
Bash
#!/bin/bash
|
|
|
|
###############################################################
|
|
###
|
|
### fail2ban konfig
|
|
###
|
|
###############################################################
|
|
|
|
apt -y install fail2ban python3-systemd
|
|
|
|
echo "[sshd]
|
|
backend=systemd
|
|
enabled = true
|
|
port = ssh
|
|
filter = sshd
|
|
logpath = /var/log/auth.log
|
|
maxretry = 3
|
|
" > /etc/fail2ban/jail.local
|
|
|
|
systemctl restart fail2ban |