2022-01-16 18:20:39 +00:00
|
|
|
---
|
|
|
|
title: "fail2ban"
|
2022-01-26 22:35:07 +00:00
|
|
|
tags: [ "Documentation", "Networking" ]
|
2022-01-16 18:20:39 +00:00
|
|
|
---
|
2020-01-02 00:04:35 +00:00
|
|
|
# SSH Daemon Jail
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.d/ssh.local
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
[sshd]
|
|
|
|
enabled = true
|
|
|
|
|
|
|
|
ignoreip = 127.0.0.1/8 ::1,192.168.0.0/16 ::1
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo systemctl restart fail2ban
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo fail2ban-client status
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
sudo fail2ban-client status sshd
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|