I can't find a good reference though my understanding is that ranges in an IPv4 address are:
a.b.c.d
I wish to block only the C ranges starting with 51.15.51.0 and ending with 51.15.142.255.
I have tried things like Deny for 51.15.51/142
in the past (the /
operator only seems to work for the d range) so this breaks the entire website with an HTTP 500 server error.
Additionally if I use Deny from 51.15
it would block ranges below c-51 and above c-142 which I don't want to do.
How do I efficiently block 51.15.51.0 through 51.15.142.255 in the htaccess
file?
for
instead offrom
(but maybe that's just a typo). However,Deny
is also deprecated on Apache 2.4 and moved to mod_access_compat (an extension not installed by default). This is also mentioned in the linked question.^51\.15\.(5[1-9]|[6-9]\d|1[0-3]\d|14[012])\.