Question: How do I block IP addresses in GHFS Hosting? Print

  • GHFS web hosting, managed hosting services, VPS hosting setup, GHFS cloud hosting, best hosting provider, GHFS Hosting, SSD web hosting, shared hosting guide, domain and hosting tutorials, hosting knowledge base, SSL installation guide, email hosting setup, hosting control panel tutorial, DNS records explained, how to register a domain, A record guide, DNS configuration guide, how to transfer a domain, MX record setup, SSL certificate troubleshooting, WordPress installation GHFS, WordPress migration guide, CNAME configuration, optimize WordPress performance, FTP upload guide, MySQL database tutorial, fix internal server error, enable SSH access, secure VPS server, Linux server commands, website security tutorial, PHP configuration guide, malware removal guide, disable root login SSH, how to manage Linux VPS, firewall configuration VPS, Apache configuration guide, VPS hosting tutorial, cloud server configuration, Nginx setup GHFS, secure hosting best practices, install Docker on VPS, DDoS protection GHFS, Node.js on VPS, Python hosting tutorial, MySQL optimization, hosting troubleshooting guide, SSL troubleshooting, secure website setup, Redis installation, hosting performance optimization, cPanel tutorial, Plesk tutorial, SMTP configuration guide, server hardening tutorial, email deliverability guide
  • 0

Answer :

Blocking IP addresses can help protect your website from spam, brute-force attacks, malicious bots, or unwanted traffic. GHFS Hosting allows you to block IP addresses easily using Plesk or additional security tools.

This article explains all available methods.


1. Method 1: Block IPs Using Plesk “IP Address Access Restrictions”

Plesk provides a built-in feature to block IPs from accessing your website.

Steps:

  1. Log in to your Plesk control panel

  2. Go to Websites & Domains

  3. Select your domain

  4. Click IP Address Access Restrictions (or Hosting Settings → Access Control, depending on Plesk version)

  5. Add the IP address or range you want to block

  6. Choose Deny

  7. Save changes

The blocked IP will no longer be able to access your site.


2. Method 2: Block IPs Using .htaccess (Apache Users)

If your site uses Apache, you can manually block IPs via .htaccess.

Add the following lines:

 
 
<RequireAll> Require all granted Require not ip 123.123.123.123 Require not ip 100.100.0.0/16 </RequireAll>

Replace the example IPs with the ones you want to block.

This method works for single IPs and IP ranges.


3. Method 3: Block IPs with nginx (Custom Rules)

If your domain uses nginx rules, block IPs using additional directives.

In Plesk:

  1. Go to Websites & Domains

  2. Click Apache & nginx Settings

  3. Scroll to Additional nginx directives

  4. Add:

 
 
deny 123.123.123.123; deny 100.100.0.0/16;
  1. Save the changes


4. Method 4: Block IPs Using WordPress Security Plugins (Optional)

If you are running WordPress, several security plugins allow IP blocking:

  • Wordfence

  • Sucuri Security

  • iThemes Security

These tools provide:

  • Automatic bot blocking

  • Rate limiting

  • Brute-force attack protection

  • Country blocking (in premium versions)

Good for users who want more advanced control.


5. Method 5: Use Fail2Ban (Server-Level, for VPS Customers)

If you have a VPS hosting plan, Fail2Ban can block IPs automatically for:

  • Login attempts

  • XML-RPC attacks

  • SSH brute-force

  • Mail server abuse

GHFS Hosting support can help enable Fail2Ban filters if needed.


6. Best Practices for IP Blocking

  • Block only necessary IPs to avoid blocking legitimate users

  • Use CIDR ranges for large attack patterns

  • Combine IP blocking with firewall rules

  • Use rate limiting for repeated requests

  • Enable security features in WordPress Toolkit


7. When to Contact GHFS Hosting Support

Contact support if:

  • You are unsure which method applies to your hosting plan

  • The blocked IP is still accessing your site

  • You suspect high-level attacks

  • You need help implementing firewall or Fail2Ban rules

Support can apply IP blocks at the server level if required.

 


Was this answer helpful?

« Back