How to Install DenyHost on CentOS 6.7

Jose Velazquez
by (71posts) under Cloud Hosting
0 Comments
Verified and Tested 08/11/15

Introduction

In this How-To, we will walk you through the install and configuration of DenyHost on a CentOS 6.7 Server. DenyHosts is used by many System Administrators to protect their servers/networks from Brute force attacks and hackers. It is simple and effective in getting the job done with little experience. Due to the simplicity of DenyHost and the ability to manually configure your rules it is widely used as an alternative to Fail2ban which is a bit more complicated to use and configure. We will now work on getting it installed on your server.

Prerequisites

You need a CentOS 6.7 server that is configured with a static IP address. If you do not have a server already, fire up a cheap and reliable Cloud Server from Atlantic.Net.

Server Preparation

First, we need to make sure that your server is fully up-to-date by running the following command:

yum update

With the server up-to-date, we can continue and install DenyHost on CentOS 6.7.

Install DenyHost on CentOS 6.7

Download the EPEL repository with the following command:

sudo rpm -Uvh http://mirror.metrocast.net/fedora/epel/6/i386/epel-release-6-8.noarch.rpm

Install the Deny Hosts package with the following:

sudo yum install denyhosts

We must make sure to allow your IP address to prevent yourself from being denied access. We do this editing the following:

nano /etc/hosts.allow

Add the following line all the way to the bottom of the description with your IP. In most cases, you can use this link to find your IP address.

sshd: YOUR.IP.ADD.RESS

Next we need to block everything by editing the following file:

nano /etc/hosts.deny

Add the following line all the way to the bottom of the description:

 sshd: ALL   **

Save your work and restart DenyHosts with the following command:

/etc/init.d/denyhosts restart

You can further configure any settings in the DenyHosts.conf file by going to the following and updating according to your preference.

nano /etc/denyhosts.conf

Congratulations! You have just installed DenyHosts on your CentOS 6.7 Server. Thank you for following along in this How-To! Check back with us for any new updates, and browse our full lineup of our SSD Cloud Hosting.


Related Posts


Free Consultation

Are you searching for a solution to tackle a unique strategic challenge, but unsure where to start?

Atlantic.Net can assist your organization in developing a customized hosting plan from design to implementation.

Get Free Consultation Today!

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

Resources