Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Apache Config, Blockign Agents?

Apache Config, Blockign Agents?
Thread Tools
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
May 8, 2003, 06:23 PM
 
I know that in the apache config, in a drectory container of a virtual host, you can place the following code to block specific people, if they, for instance, like to load your web site over and ever even, hundreds of times a day.
Code:
deny from suomen2g.fi dnainternet.fi dsl.pltn13.pacbell.net
Is there a way I can optionally block users quickly and "lite on the processor" using basically the same method only matching the agent not the host? I run whatsmyip.org and people like to make bots that load my site every 5 or 10 minutes, and create hundreds of extra usless hits a day. Lots of these programs use thier own agent type, so I could easily block them this way without blockign everyone on thier whole ISP, or just thier specific IP and when they reboot have them start all over again.
(Last edited by l008com; May 9, 2003 at 12:32 AM. )
     
rkt
Mac Enthusiast
Join Date: Oct 2000
Status: Offline
Reply With Quote
May 9, 2003, 07:36 PM
 
Originally posted by l008com:
Is there a way I can optionally block users quickly and "lite on the processor" using basically the same method only matching the agent not the host?
mod_rewrite can do what you're looking for. have a look at the section called "Blocking of Robots" on this page:
http://httpd.apache.org/docs/misc/rewriteguide.html

(obviously this requires you to enable mod_rewrite for your virtual host, but i don't think it's a huge drain on resources)
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
May 9, 2003, 08:04 PM
 
wow those rules are very complicated, i can't even understand them when i read them, its just like perl, it looks like someone just hit the options key and leaned on thier keyboard :-P
Is there an easier way to do it, something using deny, like 'deny agent wwwlib' or something
     
rkt
Mac Enthusiast
Join Date: Oct 2000
Status: Offline
Reply With Quote
May 9, 2003, 08:44 PM
 
Originally posted by l008com:
wow those rules are very complicated, i can't even understand them when i read them, its just like perl, it looks like someone just hit the options key and leaned on thier keyboard :-P
Is there an easier way to do it, something using deny, like 'deny agent wwwlib' or something
okay, i can understand that it's a little complicated at first glance, but it's really not that bad...

have a look here for some practical examples:
http://diveintomark.org/archives/200...o_to_hell.html
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
May 9, 2003, 08:47 PM
 
Originally posted by rkt:
okay, i can understand that it's a little complicated at first glance, but it's really not that bad...

have a look here for some practical examples:
http://diveintomark.org/archives/200...o_to_hell.html
Actually I found a way you can jsut use evironmental variables with the deny thing
thats much easier and faster, but thanks anyway
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:10 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2