You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fail2Ban is a program that protects servers from bruteforce attacks. (attacks in which a hacker breaks the password to SSH or another service using brute force)
First, the script will suggest changing the ssh port. For example: changing the port number from 22 to 8382 will make it harder for bots to detect ssh.
15
+
Next, you will be asked for the number of failed authorization attempts: (by default, 3)
16
+
The last question is how long in hours we will block the ip from which there were unsuccessful attempts to log in.
17
+
After that, the script will download, install, and configure the service.
18
+
The file /var/log/astra.log will also be monitored: if authorization attempts fail in the Astra web interface, the user will be blocked.
19
+
If you use a different log file name for astra, fix it in /etc/fail2ban/jail.local
20
+
21
+
The fail2ban configuration is complete.
22
+
23
+
## Use
24
+
25
+
Viewing statistics
26
+
27
+
```sh
28
+
fail2ban-client status
29
+
```
30
+
31
+
To unblock the ip, run the following command:
32
+
33
+
```sh
34
+
fail2ban-client set ssh-iptables unbanip IPADDRESS
0 commit comments