How to block IP range in CSF firewall

If you want to block a complete IP range in CSF firewall, please follow these steps:

Let’s say you want to block following IP range:

58.253.xxx.xxx

Step 1:

Login in root WHM.

Step 2:

Navigate to: WHM >> Plugins >> ConfigServer Security&Firewall

Step 3:

Block following IP using Quick Deny box.

58.253.0.0/16

Done!!!
You may need to restart CSF firewall after adding / removing IPs.
You can also block from SSH using following SSH command:

csf -d 58.253.0.0/16

Quick Note

To block 111.xxx.xxx.xxx range, use following rule

111.0.0.0/8

To block 111.111.xxx.xxx range, use following rule

111.111.0.0/16

To block 111.111.111.xxx range, use following rule

111.111.111.0/24

Our Recommended Dedicated Server

Leave us a Reply

Your email address will not be published. Required fields are marked *

* *