Jump to content

Is It Possible To Ban A Group Of IP numbers


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...