Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
debian:hosts.deny [2020/04/17 13:32] – erreur32 | debian:hosts.deny [2022/11/08 16:43] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
This is great when people are dictionary-attacking your **SSH server**, but less good when you have actual users who might get their //password wrong// | This is great when people are dictionary-attacking your **SSH server**, but less good when you have actual users who might get their //password wrong// | ||
- | + | < | |
- | ``` | + | |
#/bin/sh | #/bin/sh | ||
REMOVE=$1 | REMOVE=$1 | ||
- | / | + | |
+ | service | ||
cd / | cd / | ||
+ | |||
for THISFILE in hosts hosts-restricted hosts-root hosts-valid users-hosts; | for THISFILE in hosts hosts-restricted hosts-root hosts-valid users-hosts; | ||
do | do | ||
- | mv $THISFILE /tmp/; | + | mv $THISFILE /tmp/;cat / |
- | cat / | + | done |
- | rm / | + | |
- | done; | + | |
mv / | mv / | ||
Ligne 22: | Ligne 22: | ||
rm / | rm / | ||
- | / | + | service |
- | Needs to run as < | + | </ |
+ | |||
+ | Needs to run as //root//. | ||
+ | |||
+ | OR | ||
+ | |||
+ | < | ||
+ | |||
+ | #/bin/sh | ||
REMOVE=$1 | REMOVE=$1 | ||
- | /usr/share/denyhosts/ | + | |
+ | service | ||
cd / | cd / | ||
+ | |||
for THISFILE in hosts hosts-restricted hosts-root hosts-valid users-hosts; | for THISFILE in hosts hosts-restricted hosts-root hosts-valid users-hosts; | ||
do | do | ||
- | mv $THISFILE /tmp; | + | mv $THISFILE /tmp;cat / |
- | cat / | + | done |
- | rm / | + | |
- | done; | + | |
mv / | mv / | ||
cat / | cat / | ||
rm / | rm / | ||
+ | service denyhosts | ||
+ | </ | ||
- | ``` | + | Source: |
- | + | ||
- | /usr/share/denyhosts/daemon-control start | + | |
- | Links: | + | {{tag> |