IP Range blocking not working

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 5
Joined: 05 Dec 2012, 01:00

IP Range blocking not working

05 Dec 2012, 01:02

Below is the code I use to block some spamming IP addresses. However, records with some of these IPs are showing up in my tracking database. Is there an error in here?

#Block IPs and IP Ranges
RewriteCond %REMOTE_ADDR 64\.120\.21\..*|206\.155\.68\..*|79\.171\.81\..*|213\.13\.186\..*|38\.121\.233\.135|194\.44\.168\.66|94\.180\.79\.251|94\.180\.56\.248|94\.180\.67\.103|94\.180\.29\.5
RewriteRule (.*) $1 [F]

Thanks!

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: IP Range blocking not working

05 Dec 2012, 02:03

Let's try to slightly edit this rule:

Code: Select all
RewriteCond %{REMOTE_ADDR}  (?:64\.120\.21\..*|206\.155\.68\..*|79\.171\.81\..*|213\.13\.186\..*|38\.121\.233\.135|194\.44\.168\.66|94\.180\.79\.251|94\.180\.56\.248|94\.180\.67\.103|94\.180\.29\.5)
RewriteRule .* - [F]


Regards
Andrew

User avatar
Posts: 5
Joined: 05 Dec 2012, 01:00

Re: IP Range blocking not working

05 Dec 2012, 02:21

Thank you very much for the quick reply. I will give it a few days and see if any of these ips start showing in the logs again.

User avatar
Posts: 5
Joined: 05 Dec 2012, 01:00

Re: IP Range blocking not working

10 Dec 2012, 15:09

This does not appear to be working. I am still getting hits from the range of 79.171.81...Any thoughts?

Thanks!

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: IP Range blocking not working

11 Dec 2012, 00:47

Hello,

Well the only reason to find out is to get rewrite.log for a testing request. Instructions regarding looging are in FAQ
What you need to do is to imitate the request from this IP.

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 49 guests