IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Apache can do CIDR
especially if its as distributed by a distro.

12.34.56.64-95 == 12.34.56.64/27

But... drop the period at the end of the regex and it should work.

IOW:
^12.34.56.(6[4-9]|[7-8][0-9]|9[0-5])$


This should work if you have rewrite on:
RewriteCond %{REMOTE_ADDR} 12.34.56.(6[4-9]|[7-8][0-9]|9[0-5])
RewriteRule . - [F]
New You could also do it:
This way... so you don;t have to restart httpd every time you update the rules:

RewriteMap filt-bloc txt:/this/is/someplace/filter-ip-block.txt
RewriteCond ${filt-bloc:%{REMOTE_ADDR}} =1
RewriteRule . - [F]

But then, you will have to add the IPs to the text file individually like this:

12.34.56.64 1
12.34.56.65 1
12.34.56.66 1
12.34.56.67 1
12.34.56.68 1
12.34.56.69 1
...
12.34.56.95 1


But its very flexible and handy.
New This isn't on Apache
It's for Google Analytics. They use regex to identify IPs not to log. I need to put in the range that my employer owns, so it doesn't log hits from me.
--

Drew
New I'm surprised they don;t do CIDR
Its terribly easy.

Oh well.
     Regex question - (drook) - (4)
         Apache can do CIDR - (folkert) - (3)
             You could also do it: - (folkert)
             This isn't on Apache - (drook) - (1)
                 I'm surprised they don;t do CIDR - (folkert)

May cause dizziness, rash, diarrhea, difficulty in breathing, loss of consciousness, extreme pain, bloody stools, flaccidity, amputation, blindness, suicidal thoughts, insanity, lesions, boils, bubonic plague, anal warts, vomiting up toads and lizards, violent convulsions, death, and likely poltergeist activity.
67 ms