Categories
Linux

Denyhosts – Blocking your own IP

When testing a new plugin, I found I was repeatedly being blocked from accessing the server. The below commands were a quick way of removing our WAN IP from the Denyhosts block list.

Stop the Denyhosts service

/etc/init.d/denyhosts stop

Remove your IP from the log file

vi /etc/hosts.deny

(Look for your IP then “dd” on the line to remove it, then “ZZ” to save and exit)

Check to see if your IP is in any other files

grep "82.68.113.238" /var/lib/denyhosts/*

Start the Denyhosts service again

/etc/init.d/denyhosts start

Adapted from the following post : DenyHosts: Remove / Delete an IP address

By Mik Canavan

I'm a tech obsessed and self-confessed geek. As the Technical Director at Fivenines UK, I'm lucky that I get to faf with gadgets, design websites and fix servers...

Leave a Reply

Your email address will not be published.