cPanel IP Blocker – How to block unwanted visits and attacks

What is IP Blocker

IP Blocker is a cPanel security tool that lets you block specific IP addresses or entire IP ranges from accessing your website.
This way you can stop malicious visitors, spam bots or brute-force attacks from connecting to your website.

Blocking is applied at web server level (Apache or LiteSpeed) and is added automatically to your account's .htaccess file.
As a result, every blocked IP receives an access forbidden message (HTTP 403 Forbidden).


When you need IP Blocker

IP Blocker is useful in the following cases:

  • When you notice repeated login attempts from the same IP.

  • When a bot or crawler visits your pages far too often.

  • When you receive spam submissions from specific countries or IPs.

  • When you want to restrict access from specific regions of the world.

In the Konet environment, which is based on LiteSpeed Enterprise Web Server and Imunify360, IP Blocker works alongside the automatic firewall rules applied at server level.


How to use IP Blocker in cPanel

  1. Log in to your cPanel account.

  2. In the Security section, select IP Blocker.

  3. In the Add an IP or Range field, type the IP address you want to block.

    • You can enter a single IP (e.g. 192.168.1.1).

    • Or a range (e.g. 192.168.1.1–192.168.1.255).

    • Or CIDR notation (e.g. 192.168.1.0/24).

  4. Click Add to activate the block.

  5. The IP will be added to the list automatically and cPanel will update the .htaccess file.

On the same screen you can see the list of blocked IPs and remove one if needed.


Technical information

  • IP blocking is done through the Deny from mechanism in .htaccess, which is supported by both Apache and LiteSpeed.

  • The block takes effect immediately and applies to all domains of the same account.

  • If Imunify360 is active, the block is also reinforced at server firewall level.

  • The IPs of cPanel, WHM or webmail are not affected, unless they are explicitly added to the block list.


Practical examples

Example 1: Spam from a specific IP
You notice many spam emails or form submissions from the IP 45.134.112.10.
You add it to IP Blocker and requests from this address stop immediately.

Example 2: Repeated login attempts
In your logs you see that IPs from a foreign country are trying to log in to wp-admin.
You can block the whole IP range of that country, or the specific IPs that keep coming back.

Example 3: Protection from scanning scripts
Some bots send mass requests to find weaknesses.
With IP Blocker you can block them immediately, before they consume server resources.


Tips and best practices

  • Avoid blocking addresses in bulk without a reason, as you may also block legitimate visitors.

  • If you want geographic blocking (GeoIP), prefer Imunify360, which does it automatically and more methodically.

  • Keep a record of the IPs you have blocked, so you can restore one if needed.

  • If you see suspicious activity from many different IPs, let Konet Technical Support know so we can check it at server firewall level.


Frequently Asked Questions

Can I block IPs from other countries?
Yes, but it is more effective to use Imunify360, which applies GeoIP filtering automatically.

Does the block take effect immediately?
Yes, the change is saved in .htaccess and applied immediately.

Can a user be blocked by mistake?
Yes, if a wrong IP or range is entered. It is good practice to always check before saving.

Does it affect the site's speed?
No, the mechanism runs at web server level and does not affect performance at all.



Conclusion

cPanel's IP Blocker tool is a simple but effective way to block suspicious or unwanted IP addresses.
It can be used for temporary or permanent blocking, strengthening your site's security without affecting its speed or operation.

At Konet, IP Blocker works alongside the automatic protection systems of Imunify360 and LiteSpeed Web Server, offering an extra line of defense for customers who want to control access to their websites.

Was this article helpful?

Related service Konet Web Hosting cPanel, LiteSpeed and automatic backups: 24 every 2 hours for 48 hours, then 6 daily, 4 weekly and 3 monthly.

Related articles