Thanks to this site, I found an easy way to whitelist a host when using denyhosts. Just need to create a file called allowed-hosts with the IP addressses you want to whitelist inside /var/lib/denyhosts (or the work directory in your box).
In my case, I found very useful to whitelist the localhost address (127.0.0.1) to avoid some problems.