Blocking an IP range
-
How can I block an IP range in the .htninja file?
example: ip range 180.170.160.150 – 181.171.161.151
I have understand that there is a variable for a single range:
“// Whitelist all IPs from 1.1.1.1 to 1.1.1.255:
if ( preg_match( ‘/^1\.1\.1\.\d+$/’, $_SERVER[“REMOTE_ADDR”] ) ) {
return ‘ALLOW’; // whitelist
}”and if I write BLOCK instead allow the range will be blocked, but how to this with a larger range?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Blocking an IP range’ is closed to new replies.