Difference between revisions of "Removing banned IP from denyhosts"
From Notes_Wiki
m |
m |
||
Line 3: | Line 3: | ||
=Removing banned IP from denyhosts= | =Removing banned IP from denyhosts= | ||
'''Denyhosts has been deprecated as it is not being maintained. Please install and use fail2ban instead''' | '''Denyhosts has been deprecated as it is not being maintained. Please install and use [[fail2ban]] instead''' | ||
To remove banned IP from denyhosts follow these steps: | To remove banned IP from denyhosts follow these steps: |
Revision as of 02:17, 15 March 2015
<yambe:breadcrumb>Denyhosts configuration</yambe:breadcrumb>
Removing banned IP from denyhosts
Denyhosts has been deprecated as it is not being maintained. Please install and use fail2ban instead
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
- Use "service denyhosts stop" command to stop denyhosts service temporarily.
- Remove / comment the IP to be allowed in file /etc/hosts.deny
- Go to directory "/usr/share/denyhosts/data"
- 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.
- Use command "grep <ip-address> *" to make sure that IP is not present in any text file.
- Start denyhosts service using "service denyhosts start" command.
- 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.