Welcome to WebmasterWorld Guest from 107.20.104.161

Forum Moderators: phranque

Message Too Old, No Replies

Banning via htacces?

     

Brett_Tabke

2:53 am on Aug 28, 2000 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Don't know who or why, but sew has basically been under siege for the last couple of days. 150-200k hits to cgi's since Friday. I've blocked their hosts via all my counters and what not.

How can I ban a host via htaccess? I know there is a way - I've done it before and I can't remember how it was done. It was simple. Anyone?

Air

4:12 am on Aug 28, 2000 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Brett, HERE [engelschall.com] is the relevant documentation on how to do it - I tried it and could not get it to work on my server.

Air

4:22 am on Aug 28, 2000 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



oops sorry, had a mind melt, was thinking something more complicated ...

you can do it by just adding to .htaccess

deny from xxx.xxx.xxx.xxx

where xxx.xxx.xxx.xxx = the ip address to deny

littleman

4:28 am on Aug 28, 2000 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member



RewriteEngine on
RewriteCond %{REMOTE_HOST} host.com
RewriteRule !^http://[^/.]\*.* - [F]

RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^111.222.333.444
RewriteRule !^http://[^/.]\*.* - [F]

You could just drop these in - they will work on any domain without modification.

littleman

4:45 am on Aug 28, 2000 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Air, I like that. Short and simple. Sometimes it is the simple ways of doing things that are the hardest to learn.

Brett_Tabke

5:30 am on Aug 28, 2000 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Thanks to both of you. I was thinking along Little's approach because I didn't remember Air's trick. I knew there was a deny/accept in there somewhere. I can't use mod rewrite over on sew, or here for that matter - not compiled in.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month