mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
fix(doc) typo that made fail2ban to fail
This commit is contained in:
parent
597d949699
commit
51ae77545e
1 changed files with 55 additions and 2 deletions
|
@ -60,13 +60,66 @@ When updating the **Fail2Ban** software, the original `/etc/fail2ban/jail.conf`
|
||||||
```bash
|
```bash
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
|
|
||||||
ignoreip = 127.0.0.1/8 XXX.XXX.XXX.XXX #<= the IP address (you can put more than one, separated by a space) that you want to whitelist
|
ignoreip = 127.0.0.1/8 XXX.XXX.XXX.XXX ; <= the IP address (you can put more than one, separated by a space) that you want to whitelist
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Save the file and reload the Fail2Ban configuration:
|
4. You should get end up with something like this if you have added two ip addresses (ipv4 and [ipv6](/ipv6))
|
||||||
|
|
||||||
|
```bash
|
||||||
|
[DEFAULT]
|
||||||
|
|
||||||
|
ignoreip = 127.0.0.1/8 203.0.113.4 2001:DB8::1
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Save the file and reload the Fail2Ban configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo fail2ban-client reload
|
sudo fail2ban-client reload
|
||||||
```
|
```
|
||||||
|
|
||||||
|
6. Check that the configuration has been applied as expected:
|
||||||
|
|
||||||
|
1. You should have this result
|
||||||
|
|
||||||
|
```bash
|
||||||
|
root@sambain:/etc/nginx# fail2ban-client get sshd ignoreip
|
||||||
|
These IP addresses/networks are ignored:
|
||||||
|
|- 127.0.0.0/8
|
||||||
|
|- 2001:db8::1
|
||||||
|
|- XXX.XXX.XXX.XXX
|
||||||
|
`- 203.0.113.4
|
||||||
|
```
|
||||||
|
|
||||||
|
2. If there is an error with your change, you could end up with something like this:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo fail2ban-client get sshd ignoreip
|
||||||
|
These IP addresses/networks are ignored:
|
||||||
|
|- 127.0.0.0/8
|
||||||
|
|- #<=
|
||||||
|
|- the
|
||||||
|
|- IP
|
||||||
|
|- address
|
||||||
|
|- (you
|
||||||
|
|- can
|
||||||
|
|- put
|
||||||
|
|- more
|
||||||
|
|- than
|
||||||
|
|- one
|
||||||
|
|- separated
|
||||||
|
|- by
|
||||||
|
|- a
|
||||||
|
|- space)
|
||||||
|
|- that
|
||||||
|
|- you
|
||||||
|
|- want
|
||||||
|
|- to
|
||||||
|
|- whitelist
|
||||||
|
|- 203.0.113.4
|
||||||
|
|- XXX.XXX.XXX.XXX
|
||||||
|
`- 2001:db8::1
|
||||||
|
```
|
||||||
|
|
||||||
|
For the curious, it was because of a [comment ;](https://github.com/fail2ban/fail2ban/blob/master/config/jail.conf#L30)
|
||||||
|
|
||||||
Congratulations, no more risks of banning yourself from your own YunoHost server!
|
Congratulations, no more risks of banning yourself from your own YunoHost server!
|
||||||
|
|
Loading…
Add table
Reference in a new issue