Well, blocking a specific range of IPs from Web Host Manager (WHM) will become easier if you understand the CIDR concept. So, before starting ahead, let’s try to understand the CIDR by the below image.
I’ll try to explain CIDR in the easiest way. I know you might be confused with the above chart, although you don’t have to remember all the CIDR arguments. Just remember the below steps to perform the maximum IPs related tasks.
If you want to block a range of IPs starting from 123.x.x.x then you can use CIDR 8. For example, my website is getting too many bot traffics from the IP addresses that are starting from 123, in this case, I can block all the IPs starting from 123 with the help of CIDR which is 188.8.131.52/8
Likewise, I can block all the range of IPs starting from 123.45.x.xby modifying the previous CIDR argument. See the 16th CIDR argument from the above chart. Using /16 after the IP address will block all the range of IPs starting from 184.108.40.206to 220.127.116.11, and the final command will look like this: 18.104.22.168/16
So, now you can block two ranges of IPs, but what if you want to narrow the range? Like, you want to block a specific range of IPs starting from 123.45.222.x. You can use the /24 argument to block all the 255 IPs. For example, 22.214.171.124/24will block the range of IPs starting from 126.96.36.199 to 188.8.131.52.
That’s how you can easily block a range of IP addresses using the CIDR arguments. As shown in the image, there are several other arguments of CIDR that you can play with, but these were the most used CIDR commands that will help you put the bulk IP restrictions in WHM.
I hope now you understand the use of CIDR to block a range of IP addresses in WHM.
Now, let’s do it practically without wasting any time.
You’ve successfully blocked a range of IPs to access your website. I hope this helps you. Share this post if it helps you. Other than this, you can follow us on Facebook& Twitterto stay updated with all the latest articles.
Moreover, you can purchase WHM Reseller Hosting from us & get 24/7 call support for all your Web Hosting related queries. We’ll be happy to help you.