Unblocking an IP from Deny Hosts
As I was setting up my home testing server (Ubuntu Server 9.04), I kept running into issues with Deny Hosts while testing my server's authentication methods. It was a real pain to find out how to remove an IP that has been blocked.
First of all, references to WORK_DIR point to /var/lib/denyhosts/ or something similar on your system.
The default location for the hosts.deny file is /etc/hosts.deny.
Here's the method I used to unblock an IP:
- Stop DenyHosts
- Remove the IP address from hosts.deny
- Remove all lines containing the IP address from the following files:
- WORK_DIR/hosts
- WORK_DIR/hosts-restricted
- WORK_DIR/hosts-root
- WORK_DIR/hosts-valid
- WORK_DIR/users-hosts
- Consider adding the IP address to WORK_DIR/allowed-hosts
- Start DenyHosts