This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Block a specific IP Address
Author
Message |
lightguy1
Groupie


Joined: 08 July 2008
Posts: 63
Posted: 06 March 2012 at 11:45am

I would like to block a specific IP address. I searched the forums and FAQ and I see how I can block a range of IP addresses.

What is the expression I would use to block a specific IP address and serve a 403 forbidden to the browser?

Thanks,

AG
Back to Top
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 07 March 2012 at 5:32am

Hello,

You'll find an example in FAQ

Regards
Andrew
Back to Top
 
lightguy1
Groupie


Joined: 08 July 2008
Posts: 63
Posted: 07 March 2012 at 8:52am

I did see that section in the FAQ

RewriteCond %{REMOTE_ADDR} ^203\.20(?:7\.(?:[6-9][0-9]|\d{3})|8\.(?:1?[0-9]|4|5[0-9]|3[2-9]|6[0-3]))\.\d{1,3}$
RewriteRule .? - [F]

If I add that expression to my rewrite file, it will not block the selected IP address...

The actual expression I was using to block an individual IP was this:

#RewriteCond %REMOTE_ADDR 76\.16\.102\.111
#RewriteRule (.*) $1 [F]

Is the above expression correct?

TIA
Back to Top
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 13 March 2012 at 4:52am

Hello,

Try using the following:

Code:
RewriteCond %{REMOTE_ADDR} ^76\.16\.102\.111$
RewriteRule .* - [F]


Regards
Andrew
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version