Add 'use-fail2ban.md'
This commit is contained in:
parent
7799de5738
commit
a4472c6ffe
1 changed files with 28 additions and 0 deletions
28
use-fail2ban.md
Normal file
28
use-fail2ban.md
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Use Fail2ban
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```
|
||||||
|
apt install fail2ban
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Add the following to `/etc/fail2ban/jail.d/defaults-debian.local`:
|
||||||
|
|
||||||
|
```
|
||||||
|
[DEFAULT]
|
||||||
|
# in seconds
|
||||||
|
bantime = 3600
|
||||||
|
maxretry = 3
|
||||||
|
backend = auto
|
||||||
|
|
||||||
|
[sshd]
|
||||||
|
enabled = true
|
||||||
|
filter = sshd
|
||||||
|
backend = systemd
|
||||||
|
```
|
||||||
|
|
||||||
|
## Apply Changes
|
||||||
|
|
||||||
|
Run `service fail2ban restart` to activate the changes.
|
Loading…
Reference in a new issue