Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Friday, October 8, 2010

Browse » Home » , , , » How to delete an IP from Deny Host List?

How to delete an IP from Deny Host List?



I've followed your guide and installed denyhosts to protecton my RedHat 5.3 OpenSSH based server. However, I've been accidentallyblocked out from my home ADSL IP address. I tried removing my blockedIP from /etc/hosts.deny, but it did blocked it again quickly. Itappears that DenyHosts keeps track of the attempts somewhere on disk ormemory. How do I remove my own home IP address from DenyHosts?

Simply removing your IP from /etc/hosts.deny does not work sinceDenyHosts keeps track of the attempts in the /usr/share/denyhosts/datadirectory. In order to remove your IP address you will need to do thefollowing.

Step # 1: Stop DenyHosts

# /etc/init.d/denyhosts stop

Step # 2: Remove Your IP From /etc/hosts.deny


# vi /etc/hosts.deny
Delete your IP address. Save and close the file.

Step # 3: Remove Your IP From /usr/share/denyhosts/data Directory

Cd to /usr/share/denyhosts/data
# cd /usr/share/denyhosts/data
You need to edit the following files using vi and remove the lines containing the IP address. 
  1. hosts
  2. hosts-restricted
  3. hosts-root
  4. hosts-valid
  5. users-hosts
Save the file.

If you've static IP address add to allowed-hosts file. Any IPaddress that appears in this file will not be blocked by default(consider this as a whilelist):
# echo '1.2.3.4' >> allowed-hosts

Step # 4: Start DenyHosts

# /etc/init.d/denyhosts start

THANKS

You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.
Thanks YAHOO OR GMAIL

0 comments:

Post a Comment

 
Back to Top