mrmike987 Posted July 15, 2007 Posted July 15, 2007 How can I block an IP range like this: 62.56.129.128 - 62.56.129.159 Quote
GvilleRick Posted July 15, 2007 Posted July 15, 2007 You can add a deny from 62.56.129 in your htaccess file to block the entire range from 62.56.129.0 to 62.56.129.255. Quote
mrmike987 Posted July 15, 2007 Author Posted July 15, 2007 You can add a deny from 62.56.129 in your htaccess file to block the entire range from 62.56.129.0 to 62.56.129.255. But I only want to block the range above. Do have to put in every address or is there a shortcut Quote
carbonize Posted July 15, 2007 Posted July 15, 2007 As GvilleRick actually said just add 62.56.129. to your htaccess file as deny from 62.56.129. there is something to put before it but I forget. Quote
TCH-Bruce Posted July 15, 2007 Posted July 15, 2007 I did a google search and found this: RewriteEngine OnRewriteCond %{REMOTE_ADDR} ^aaa\.bbb\.(23[2-9]¦24[0-2])\. [OR] RewriteCond %{REMOTE_ADDR} ^aaa\.bbb\.243\.([0-9]¦[1-9][0-9]¦1[0-4][0-9]¦15[0-1])$ RewriteRule .* - [F] where aaa and bbb are the first respectively second '***' from your range. Be sure to replace the broken pipe characters ¦ with the real ones from your keyboard. Adapt it to your range. Quote
carbonize Posted July 15, 2007 Posted July 15, 2007 (edited) Seriously over complicated there >order allow,deny deny from 62.56.129. allow from all hxxp://www.javascriptkit.com/howto/htaccess5.shtml is a great source of htaccess info. Edited July 15, 2007 by carbonize Quote
TCH-Bruce Posted July 15, 2007 Posted July 15, 2007 But he doesn't want to block the entire block of address, just a range of addresses. Quote
carbonize Posted July 15, 2007 Posted July 15, 2007 Ah yes you're right. Nasty habit I have of speed reading forums. Using my method he could use deny from .satcom-systems.net but for some reason the server doesn't always get the hostname of visiting ip addresses. Quote
MikeJ Posted July 16, 2007 Posted July 16, 2007 Within IP Deny Manager: You can specify denied IP addresses in the following formats: 10.5.3.3 Single IP Address 10.5.3.3-10.5.3.40 Range 10.5.3.5-40 Implied Range 10.5.3.3/32 CIDR Format 10. Implies 10.*.*.* So in your case, you could use any one of the following formats: 62.56.129.128/27 62.56.129.128-159 62.56.129.128-62.56.129.159 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.