August 16, 2012

How To Delete/Remove Blocked IP From DenyHosts

1. First you need to stop Denyhosts service, by following command.
[root@geopc ~]# /etc/init.d/denyhosts stop
2. Next open file /etc/hosts.deny with below command.
[root@geopc ~]# vi /etc/hosts.deny
3. Delete blocked IP address, then save and close above file.
4. Now go to directory called /usr/share/denyhosts/data or /var/lib/denyhosts/
[root@geopc ~]# cd /usr/share/denyhosts/data
5. Next you need to delete blocked IP from all below following files with help of vi editor.
[root@geopc ~]# vi hosts
[root@geopc ~]# vi hosts-restricted
[root@geopc ~]# vi hosts-root
[root@geopc ~]# vi hosts-valid
[root@geopc ~]# vi users-hosts
6. Once you removed your blocked IP from all above files, then start Denyhosts service.
[root@geopc data]# /etc/init.d/denyhosts start

No comments:

Post a Comment