Blocking unwanted or malicious IP addresses can help protect your website from unauthorized access, spam, or brute force attacks. cPanel includes a tool called IP Blocker, which allows you to easily deny access to your site from specific IP addresses or ranges. This guide explains how to use the tool effectively.

 

Why Block an IP Address?

Blocking an IP address may help you:

  • Prevent brute force login attempts.

  • Reduce spam and malicious requests.

  • Restrict access from specific regions or networks.

 

Steps to Block an IP Address in cPanel

1. Log in to cPanel

  • Open your browser and navigate to your cPanel login URL (e.g., https://yourdomain.com/cpanel).

  • Enter your username and password.

  • Click Log in.

2. Open the IP Blocker Tool

  • In the cPanel dashboard, scroll to the Security section.

  • Click IP Blocker.

3. Add an IP Address or Range

  • In the field labeled Add an IP or Range, enter the IP address or range you want to block.
    Examples:

    • Single IP: 192.168.1.1

    • Range: 192.168.1.1-192.168.1.255

    • CIDR format: 192.168.1.0/24

  • Click Add to block the address.

  • IPv6 addresses can also be blocked, but they use a different format (e.g., 2001:0db8:85a3::8a2e:0370:7334). Make sure to copy the full address when blocking.

4. Verify the Block

  • The IP address will now appear in the Currently-Blocked IP Addresses list.

  • Any visitor using that IP will no longer be able to access your website.

 

How to Remove a Blocked IP Address

  • Go back to the IP Blocker tool.

  • In the Currently-Blocked IP Addresses list, locate the IP you want to unblock.

  • Click Delete next to the entry.

 

Tips for Managing IP Blocks

  • Identify Suspicious IPs: Use server logs (found under Metrics > Raw Access in cPanel) or third-party tools (like Google Analytics or Cloudflare) to identify malicious or suspicious IP addresses.

  • Avoid blocking wide ranges: Be cautious with large ranges (e.g., /16 or larger), as this could unintentionally block legitimate users.

  • Review regularly: Monitor your traffic periodically to ensure that your IP blocks are still relevant and necessary.

 

Additional Security Measures

Blocking IPs is one step in securing your site. You may also consider:

  • Firewalls: Configure a web application firewall (WAF) to automatically block known threats.

  • CMS plugins: If you're using a content management system like WordPress, consider installing a reputable security plugin for enhanced protection and logging.

  • If you're managing a VPS or dedicated server with root access, consider using server-level tools like CSF (ConfigServer Security & Firewall) or Fail2Ban for more automated and flexible IP blocking based on login failures or abnormal activity.

 

If you have questions or need assistance with managing IP blocks, reach out to Lanetti support. We're here to help protect your website!

Was this answer helpful? 0 Users Found This Useful (0 Votes)