Live Chat

Domain Scan

(empty)

Login


How to Limit Your Website Access to Specific Countries
(31-jul-2024)

Using IP Blocker in cPanel for Website Security

The IP Blocker feature in cPanel is a powerful tool that allows you to block specific IP addresses, a range of IP addresses, or even domain names from accessing your website. This feature is incredibly useful for preventing unwanted visitors, such as spammers, hackers, or bots, from causing harm to your site. In this blog post, we'll cover how to effectively use the IP Blocker to secure your website hosted with Register.lk.

How to Block a Single IP

Block a Single IP:
  • Log in to your cPanel account.
  • Navigate to the 'Security' section and click on 'IP Blocker.'
  • Enter the specific IP address you want to block in the 'Add an IP or Range' field. For example, "192.168.1.1".
  • Click 'Add.'
This action will prevent the specified IP address from accessing your website.

How to Block a Range of IP Addresses

Block a Range of IPs:
  • Log in to your cPanel account.
  • Navigate to the 'Security' section and click on 'IP Blocker.'
  • Enter the range of IP addresses you want to block in the 'Add an IP or Range' field. For example, "192.168.1.1-192.168.1.255".
  • Click 'Add.'
This will block any IP address within the specified range from accessing your site.

How to Block an Implied Range of IP Addresses

Block an Implied Range:
  • Log in to your cPanel account.
  • Navigate to the 'Security' section and click on 'IP Blocker.'
  • Enter the implied range in the 'Add an IP or Range' field. For example, "192.168.1.*".
  • Click 'Add.'
This will block all IP addresses starting with "192.168.1".

How to Block in CIDR Format

Block Using CIDR:
  • Log in to your cPanel account.
  • Navigate to the 'Security' section and click on 'IP Blocker.'
  • Enter the CIDR notation in the 'Add an IP or Range' field. For example, "192.168.1.0/24".
  • Click 'Add.'
This notation blocks all IP addresses within the specified subnet.

Blocking IPs Using Implied Wildcards

Block Using Wildcards:
  • Log in to your cPanel account.
  • Navigate to the 'Security' section and click on 'IP Blocker.'
  • Enter the IP range with wildcards. For example, "192.*.*.*".
  • Click 'Add.'
This will block all IP addresses starting with "192.".

Important Note: It's essential to understand that the IP Blocker function will not block access to the cPanel login page or the Webmail login page.

When to Use IP Blocking

Security Breaches:
If you notice suspicious activity from specific IP addresses, blocking those IPs can prevent further attempts to breach your site.

Spam Prevention:
Blocking IPs that are known to send spam can help maintain your website's integrity and reduce unwanted traffic.

DDoS Attacks:
During Distributed Denial of Service (DDoS) attacks, blocking the attacking IP ranges can help mitigate the attack's impact on your site.

Geographical Restrictions:
If you need to restrict access from certain countries or regions, blocking IP ranges from those locations can be effective.

Mitigating Risks and Additional Benefits

Mitigating Risks:
By blocking malicious IPs, you can reduce the risk of hacking attempts, data breaches, and other security threats. This proactive measure helps protect your website's data and your users' information.

Improved User Experience:
By preventing malicious activities, you ensure a smoother and safer browsing experience for your genuine visitors.

Conclusion

Implementing geographical restrictions through the IP Blocker feature in cPanel is an essential step in enhancing your website's security. By selectively blocking specific IP addresses or ranges, you can effectively mitigate threats from unwanted visitors, such as spammers, hackers, and bots. This proactive approach not only protects your site from potential breaches but also ensures a safer and more pleasant browsing experience for your legitimate users. Remember, while IP blocking is a powerful tool, it should be part of a broader security strategy to safeguard your online presence.

Stay vigilant, keep your site secure, and provide a safe environment for your visitors by utilizing the IP Blocker feature in cPanel. Happy hosting with Register.lk!


Written by: Register.lk Support Hero - Kesaru
BACK 2 BLOG