I have been using IIRF for a few months now, and I love it. This week, I wrote some rules that allow me to blacklist bad bots and abusive users from accessing any sites on our servers. In this particular example, I am blocking IP 24.132.226.94 and user agent Java/1.6.0-oem.

RewriteCond %{REMOTE_ADDR} 24.132.226.94
RewriteCond %{HTTP_USER_AGENT} Java/1.6.0-oem
RewriteRule ^/(.*)$ /$1 [F]


The rewrite rule says match any file to that exact file name, but add the F forbidden flag to deliver the 403 error page to the client. I love this method because it allows me to block based on IP address and user agent instead of just the IP like IIS offers.

Last edited Aug 23, 2008 at 4:26 PM by Cheeso, version 1

Comments

jcdisciple Oct 10, 2012 at 6:03 PM 
I also tried this

RewriteCond %{REMOTE_ADDR} ^24\.132\.226\.94$
RewriteRule ^/(.*)$ /$1 [F]

This is based on the documentation
http://dotnetzip.herobo.com/Iirf21Help/html/563a06a2-bd46-45e8-9d5a-1184eade19df.htm

jcdisciple Oct 10, 2012 at 6:00 PM 
Does this still apply to the current version of IIRF??

I am trying to block a domain

RewriteCond %{REMOTE_ADDR} 173.193.130.48
RewriteRule ^/(.*)$ /$1 [F]

Its not working