Difference between revisions of "Removing banned IP from denyhosts"

From Notes_Wiki
m
m
 
Line 1: Line 1:
<yambe:breadcrumb>Denyhosts configuration</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Security tools]] > [[Securing remote shell access]] > [[Denyhosts configuration]] > [[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'''
Line 18: Line 16:
# Start denyhosts service using "service denyhosts start" command.
# 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.
# 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.
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Security tools]] > [[Securing remote shell access]] > [[Denyhosts configuration]] > [[Removing banned IP from denyhosts]]

Latest revision as of 14:38, 24 March 2022

Home > CentOS > CentOS 6.x > Security tools > Securing remote shell access > Denyhosts configuration > 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

  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.



Home > CentOS > CentOS 6.x > Security tools > Securing remote shell access > Denyhosts configuration > Removing banned IP from denyhosts