Whitelist a host when using denyhosts

denyhosts I’m using this excellent tool on my hosting server called denyhosts. It basically scans trough auth.log for repeated failed attempts to login in order to block brute force attackers. It can also get a list of offending ip-s from other usesrs of DenyHosts who configured their instalation to share attacker ip’s. All nice and well until you mistype your password one to many times. Or 127.0.0.1 gets added to the list like it happened today for me. So, you need to add a few ip’s to a whitelist.

It’s easy. Create a file called allowed-hosts in /var/lib/denyhosts or whatever you set your work dir for. Inside this file you can list ip’s that should be whitelisted.