cPanel Basics: How To Block Access By IP Address

July 9th, 2008 · 2 Comments

cPanel Tutorial - IP Deny ManagerSometimes your website’s security (or your entire web server’s) can be at risk because of malicious people. And it’s not necessarily a user that’s attacking your system; it could be an automated script that just “found” your server.

Attacks are not always in the attempt of breaking in your system. It could be a DoS (Denial of Service) or a spammer trying to post comments on your blog or forum.

While there are some automated solutions to this (like APF or cpHulk), there are times when human intervention is needed.

In this tutorial, I will show you how you can block IP addresses manually with cPanel.

This tutorial assumes that you’re already logged in cPanel. Your control panel skin and layout maybe different from my InMotion Hosting account.

  1. From the Security panel, click on the IP Deny Manager icon.
    cPanel IP Deny Manager - InMotion Hosting
  2. Now at this point, you must know either the IP address, the IP address range or the hostname your want to block.
    I do not like the fact that cPanel says you can enter a domain name to block because you’re not blocking an entire domain, you will only be blocking the IP address corresponding to this domain. You’re rather blocking a hostname, not a domain name

    cPanel - Blocking IP Address - InMotion Hosting

  3. Click on Add button and you’re done.

You should now see the IP address blocked at the bottom of the screen:

cPanel - Blocked IPs - InMotion Hosting

To give access back to the blocked IP, simply click on the Remove link next to the corresponding entry.

Links

2 responses so far ↓

1. Response by : Anonymous on Jul 23, 2009 at 10:48 pm

Okay, I Get It, But How Would I Redirect Them So When i Block Them Instead Of It Going To A ERROR 403 Page It Can Go To A Diffrent Page Like A PHP File That Reads “ERROR: Your IP Has Been Blocked. Please Contact The Webmaster For More Information.”

Thanks.

2. Response by : Stephane Brault on Jul 24, 2009 at 1:37 pm

Well if you choose to block an IP address using cPanel, you’ll have to modify your 403 error page.

Leave a Comment




 
 
 

Tutorials by Category

 
 
 
 

Recent Comments