Removing banned IP from denyhosts

From Notes_Wiki
Revision as of 09:49, 8 November 2012 by Saurabh (talk | contribs) (Created page with "=Removing banned IP from denyhosts= To remove banned IP from denyhosts follow these steps: Check whether IP is present in "/etc/hosts.deny" or not. If IP is not present in t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Removing banned IP from denyhosts

To remove banned IP from denyhosts follow these steps:

Check whether IP is present in "/etc/hosts.deny" or not. If IP is not present in the file then it is not blocked.

If IP is present then use following procedure to remove IP from denyhosts ban

  1. Use "service denyhosts stop" command to stop denyhosts service temporarily.
  2. Remove / comment the IP to be allowed in file /etc/hosts.deny
  3. Go to directory "/usr/share/denyhosts/data"
  4. Remove the IP from all text files in that directory. Do not add untrusted IPs to allowed-hosts file, else that person will never get blocked no matter how many bad tries he makes.
  5. Use command "grep <ip-address> *" to make sure that IP is not present in any text file.
  6. Start denyhosts service using "service denyhosts start" command.
  7. Wait for a minute or so and check file /etc/hosts.deny that the IP is not added again to banned IPs list. This is necessary to ensure the unblocking was successful.