IP Range blocking not working
5 posts
• Page 1 of 1
- paulryanwelch
- Posts: 5
- Joined: 05 Dec 2012, 01:00
IP Range blocking not working
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!
#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!
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: IP Range blocking not working
Let's try to slightly edit this rule:
Regards
Andrew
- 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
- paulryanwelch
- Posts: 5
- Joined: 05 Dec 2012, 01:00
Re: IP Range blocking not working
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.
- paulryanwelch
- Posts: 5
- Joined: 05 Dec 2012, 01:00
Re: IP Range blocking not working
This does not appear to be working. I am still getting hits from the range of 79.171.81...Any thoughts?
Thanks!
Thanks!
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: IP Range blocking not working
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
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
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 49 guests