Forum Moderators: phranque
My webalizer stats and apache logs show that in the last 2 months visitors from Poland have downloaded huge quantities of data (mainly images) from my site. I want to block these visitors - I never get orders or enquiries from Poland and don't expect I ever will.
The Webalizer stats show the main offenders are coming from hostnames ending in .pl
Is there someway of blocking visitors from hostnames ending with .pl ?
I saw another thrread suggesting something like this in HT access might work:
order allow,deny
deny from .pl
allow from all
I'd appreciate some opinions on whether this would work and if there are any side effects I should be aware of
Thanks
The side effect of most concern is that checking {REMOTE_HOST} instead of {REMOTE_ADDR} causes your server to have to do a reverse-DNS lookup on each request where {REMOTE_HOST} is checked.
I'd suggest you test this method and see what effect (if any) you notice on your server performance.
The alternative is to try to come up with a short list of IP address ranges that will block 90% of your unwelcome visitors (I assume you're already doing a referrer check on image loads).
Jim
The parasites come from a variety of IP addresses so I've decided to try blocking by country and will try and judge if it perceptably slows response times.
I added this to HTACCESS:
order deny,allow
deny from .pl
deny from .cz
deny from .yu
For the benefit of anyone else reading this thread I used "order deny, allow" as this means access is allowed by default and then the deny clauses are evaluated. If you use "order allow, deny" access is denied by default
Jim, thanks for reminding me about checking referrer for people wanting to download images. This is something I've been meaning to do for a while. Need to review the posts on this forum to work out what to do.
Cheers
Nubbin