HOME & BUILDING AUTOMATION

SDS ITALIA SRL
Piazza IV Novembre, 13
20077 Melegnano (MI)
P.IVA 03216490965
Tel. 02 98233157
Fax 02 98126770
info@sdsitalia.it

IL VOSTRO INDIRIZZO
IP = 3.85.63.190

Linux – IP bloccati

Come rimuovere un IP bloccato da DenyHosts.
http://denyhosts.sourceforge.net/faq.html#3_19

If you have been accidentally locked out of one of your hosts (because DenyHosts has added it to /etc/hosts.deny you may have noticed that simply removing it from /etc/hosts.deny does not in itself correct the issue) since DenyHosts keeps track of the attempts in the WORK_DIR (WORK_DIR =/var/lib/denyhosts) files.

In order to cleanse the address you will need to do the following:
1. Stop DenyHosts => /etc/init.d/denyhosts stop
2. Remove the IP address from /etc/hosts.deny => vim /etc/hosts.deny

Andare nella dir /var/lib/denyhosts e digitare il comando: grep -R “IP_INCRIMINATO” *

3. Editare il  file WORK_DIR/hosts e rimuovere la riga con “IP_INCRIMINATO”. Salvare il file.
4. Editare il  file WORK_DIR/hosts-restricted e rimuovere la riga con “IP_INCRIMINATO”. Salvare il file.
5. Editare il  file WORK_DIR/hosts-root e rimuovere la riga con “IP_INCRIMINATO”. Salvare il file.
6. Editare il  file WORK_DIR/hosts-valid e rimuovere la riga con “IP_INCRIMINATO”. Salvare il file.
7. Editare il  file WORK_DIR/user-hosts e rimuovere la riga con “IP_INCRIMINATO”. Salvare il file.
8. (optional) Consider adding the IP address to WORK_DIR/allowed-hosts
9. Start DenyHosts => /etc/init.d/denyhosts start

Note: Not all of the WORK_DIR files will contain the IP address so you may want to use grep to
determine which files contain the IP address.