About DenyHosts DenyHosts is a security tool written in python that monitors server access logs to prevent brute force attacks on a linux server. The program works by banning IP addresses that exceed a certain number of failed login attempts. Step One—Install Deny Hosts DenyHosts is very easy to install on Ubuntu # apt-get install denyhosts On RHEL/Centos: We need epel repo to install fail2ban on RHEL/Centos based machines. So, download the rpm:- # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm and, then install # yum install denyhosts Once the program has finished downloading, denyhosts is installed and configured on your linux server. Step Two—Whitelist IP Addresses After you install DenyHosts, make sure to whitelist your own IP address. Skipping this step will put you at risk of locking yourself out of your own machine. Open up the list of allowed hosts al...