| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Blocking IPs with subnet mask|
| 1:45 am on Apr 15, 2002 (gmt 0)|
Suppose the IP range is aa.bb.cc.224 - 255
In .htaccess, I want to deny this range. What is the subnet mask?
Deny from aa.bb.cc.224/255.255.255.31 ?
Deny from aa.bb.cc.31/255.255.255.224 ?
or something else? It's hard to test it. Right now I'm using
Deny from aa.bb.cc
but I don't want to deny from 0-223
| 3:15 am on Apr 15, 2002 (gmt 0)|
I don't believe there is a "range" operator other than the entire 256 ips in a c block.
| 3:51 am on Apr 15, 2002 (gmt 0)|
SetEnvIf Remote_Addr "^aa.bb.cc.22[4-9]$" ban
SetEnvIf Remote_Addr "^aa.bb.cc.2[3-9][0¦4-9]$" ban
Place deny from env=ban within <limit></limit> tags.
This should ban every IP between aa.bb.cc.224 and aa.bb.cc.256
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved