How to block an IP address or a domain name using cPanel

January 29, 2021 / cPanel & WHM
In today’s digital world, business website security is critical. An effective way to increase security is to block IP addresses or domain names that pose a threat. You can protect your website from hacking attempts, DDoS attacks and other malicious activities.

This article will guide you through the process of blocking unwanted IP addresses and domain names using the cPanel IP Blocker tool.
 

Block an IP address or a Domain Name in cPanel

Before proceeding for IP blocking , you need to know the that IP address or domain name you want to block.
  1. Log in to your cPanel account.
  2. In the cPanel dashboard , Scroll down to the Security section and click on “IP Blocker”.
    IP blocker
  3. Now, here you will get the option of “Add an IP or Range”. You have to enter the IP address or domain name that you want to block.

    Apart from that, you can also block a range of IP addresses. For this, you need to specify the first and last IP addresses separated by hyphens. For e.g. – 193.166.0.2-193.166.0.50

    If you wish, you can also enter an IP range to block a range of IP addresses. See bottom of page for the correct format.
    add range of up address
  4. To start the blocking process, click the “Add” button. If the blocking is successful, you get a notification confirming the action. You will then see the following notification:
    blocking is successful
  5. When you return to the IP Blocker dashboard, you will see the IP address or domain name listed in the Currently-Blocked IP Addresses table.
    Currently-Blocked IP Addresses
If you wish to unblock an IP address or domain name in the future, simply find the entry in the “Currently-Blocked IP Addresses” table and click “Delete” in the Actions column. by doing so, it will remove the block and allow access from the previously blocked IP or domain.
 

Additional Information:

IP addresses, IP range and domain name formats

Single IP Address – To block a single IP address, use the standard IP format of four sets of numbers, each separated by a dot. For example, 193.166.0.2

Range – To block a range of IP addresses, list the first and last of the range you wish to block and separate them with a hyphen/dash. For example, 193.166.0.2-193.166.0.50

Implied Range – This is a shorthand way to input a range. For example: 193.166.0.2-50

Implied IP address – This uses a truncated version of an IP address to bulk block all IP addresses that follow the last used dot. For example, inputting 193. would block all IP addresses which start with 193. Similarly, inputting 193.166. would block all IP addresses beginning with 193.166.

Domain name – This uses the domain name e.g. website.com. You don’t need to input the full URL. When this in inputted, IP Blocker will try to find the domain’s IP address for you.

In this way , you can block IP addresses or domain names in cPanel. In addition, you can manage multiple accounts in WHM for better site management. If you need to change the IP addresses associated with multiple accounts for any reason, WHM provides a convenient solution. this helps to efficiently monitor and manage the IP addresses in your hosting accounts in WHM.

Spread the love