How to Block Malicious IP Addresses Using cPanel IP Blocker

54 views
Short answer: Launch cPanel IP Blocker, enter offensive single IP addresses or CIDR subnets, and click 'Add' to instantly reject unwanted traffic at web server level.

Block persistent scrapers, brute-force bots, and unwanted visitors from accessing your website by IP address or CIDR subnet.

Quick reference

Tool Location cPanel > Security > IP Blocker
Single IP Format 198.51.100.4
CIDR Subnet Format 198.51.100.0/24 (blocks entire range 198.51.100.1 to 198.51.100.254)
Mechanism Inserts Deny directives into .htaccess

Steps

  1. Navigate to IP Blocker: Under Security in cPanel, select IP Blocker.
  2. Add an IP or Range:
    • In the IP Address or Domain field, enter the target IP (e.g. 203.0.113.15) or subnet (e.g. 203.0.113.0/24).
    • Click Add.
  3. Manage Blocked IPs: Scroll down to Currently-Blocked IP Addresses to review existing blocks or click Delete to unban an address.

Troubleshooting and tips

  • Accidentally Blocked Your Own IP: If you accidentally entered your own IP, log in to cPanel via your mobile phone's cellular connection, go to IP Blocker, and delete the rule.
  • Difference from Imunify360: The cPanel IP Blocker writes simple Apache rules. For sophisticated Layer-7 DDOS attacks, malicious malware scripts, or Web Application Firewall rules, Sib Host's automated Imunify360 WAF protects your account automatically.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket