namaste Posted July 8, 2006 Posted July 8, 2006 Is is possible to ban any specific IPs that occur within a range of IPs, for example; What if I wanted to ban any attempts to access our web site from this range of numbers, 85.102.40.0 - 85.102.255.255, would this be possible? I've attempted inserting a comma between these numbers but that does not seem to work. When I've viewed my Raw Access Log, I've found evidence of script kiddies attemtping to access our site. When I ban the specific IP, they return with a slightly different IP number and I'm starting to develop a rather LONG list of BannedIPs originating from / via this route which is in Turkey; A portion of the WHOIS for the IP returns the following; This is the RIPE Whois query server #2. % Information related to '85.102.40.0 - 85.102.255.255' inetnum netname: TurkTelekom role: TT Administrative Contact Role address: Turk Telekom address: Bilisim Aglari Dairesi address: Aydinlikevler I'm using phpNuke ver - 7.8 Quote
TCH-Thomas Posted July 8, 2006 Posted July 8, 2006 I can be wrong about this, but try 85.102.40 That should ban what you want if I understand previous posts correct about similar situations. Quote
namaste Posted July 8, 2006 Author Posted July 8, 2006 Or you can ban by their TLD name: domain.ext Bruce would you please provide a little more detail on the "TLD name: domain.ext"? Where would one locate that.... Raw Log Access file?? Quote
TweezerMan Posted July 8, 2006 Posted July 8, 2006 To block access from IP addresses in the range of 85.102.40.0 - 85.102.255.255, you'd need 4 directives in your .htaccess file: ># Block IPs in the range of 85.102.40.0 - 85.102.255.255 deny from 85.102.40.0/21 deny from 85.102.48.0/20 deny from 85.102.64.0/18 deny from 85.102.128.0/17 85.102.40.0/21 blocks 85.102.40.0 - 85.102.47.255 [2048 IPs] 85.102.48.0/20 blocks 85.102.48.0 - 85.102.63.255 [4096 IPs] 85.102.64.0/18 blocks 85.102.64.0 - 85.102.127.255 [16384 IPs] 85.102.128.0/17 blocks 85.102.128.0 - 85.102.255.255 [32768 IPs] ...for a total of 55,296 IP addresses blocked. Blocking "85.102.40" will just block the range of 85.102.40.0 - 85.102.40.255 [256 IPs], a much smaller range than what is desired. Quote
TCH-Bruce Posted July 8, 2006 Posted July 8, 2006 Bruce would you please provide a little more detail on the "TLD name: domain.ext"? Where would one locate that.... Raw Log Access file?? There are tools available that will do a reverse lookup of an IP address to give you a domain name. 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.