Forum Moderators: phranque

Message Too Old, No Replies

Banning a range of consecutive IP's?

         

SlothVader

3:55 am on May 13, 2005 (gmt 0)

10+ Year Member



I have seen a number of examples of ways to ban a range of IP's. But I have not seen the method that would work to ban the entire range from

211.215.0.0 to 211.255.255.255

For example, presently I am banning traffic from the following IP's.

deny from 211.215.
deny from 211.226.
deny from 211.227.
deny from 211.228.
deny from 211.229.
deny from 211.230.
deny from 211.231.
deny from 211.232.
deny from 211.233.
deny from 211.234.
deny from 211.238.
deny from 211.239.
deny from 211.248.
deny from 211.232.
deny from 211.233.
deny from 211.234.
deny from 211.235.
deny from 211.236.
deny from 211.237.
deny from 211.238.
deny from 211.239.
deny from 211.240.
deny from 211.241.
deny from 211.242.
deny from 211.243.
deny from 211.244.
deny from 211.245.
deny from 211.246.
deny from 211.247.
deny from 211.248.
deny from 211.248.
deny from 211.250.
deny from 211.251.
deny from 211.252.
deny from 211.253.
deny from 211.254.
deny from 211.255.

It would obviously be better for my .htaccess file (make it smaller with less lines ) if I could consolidate all those lines of 'deny' down to one line.

211.215.0.0 to 211.255.255.255

So how do I code this into one line for the .htaccess.

I have a number of situations where I want to trim down my .htaccess file and where I am trying to rid the site of visitors from

x.y.00 to x.z.255.255

Thanks in advance for your input.

jdMorgan

4:04 am on May 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This recent thread might help: [webmasterworld.com...]

Jim