homepage Welcome to WebmasterWorld Guest from 54.197.211.197
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Banning by Host Name
creepychris

10+ Year Member



 
Msg#: 491 posted 3:19 am on Oct 25, 2003 (gmt 0)

Hello. I have just finished spending two hours reading the super long thread on .htaccess. What an unbelievable resource! I found out everything I needed to know for banning by I.P. and banning by user agent. But I couldn't find anything on banning by a host name (where a host name shows up in my stats instead of an I.P.).

This nasty thing:

Host name equals: ar-gw.example.super.pl

has requested over 2 gigabytes of bandwidth in 9 visits and I would like to block it.

Secondly, how could I test if I did it right? I have used wannabrowser in the past but that seems to be for user agent.

Thanks in advance! Really amazed at the discussions I read on .htaccess here.

[edited by: jdMorgan at 3:32 am (utc) on Oct. 25, 2003]
[edit reason] examplified URL [/edit]

 

marcs

10+ Year Member



 
Msg#: 491 posted 3:28 am on Oct 25, 2003 (gmt 0)

You could look up the IP for the hostname :

Name: ar-gw.example.super.pl
Address: 212.xx.120.218

If that IP is dynamic, you could also ban by hostname :

deny from ar-gw.example.super.pl

[edited by: jdMorgan at 3:34 am (utc) on Oct. 25, 2003]
[edit reason] Generalized remote host & URL [/edit]

creepychris

10+ Year Member



 
Msg#: 491 posted 3:30 am on Oct 25, 2003 (gmt 0)

Thanks :) That was fast.

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 491 posted 3:37 am on Oct 25, 2003 (gmt 0)

creepychris,

Welcome to WebmasterWorld [webmasterworld.com]!

> Secondly, how could I test if I did it right? I have used wannabrowser in the past but that seems to be for user agent.

You can't really test it unless you have a friend who uses that host. However, short of a typographical error, it'll work fine, and you'll see them get denied the next time they 'visit'.

Jim

[edited by: jdMorgan at 3:53 am (utc) on Oct. 25, 2003]

creepychris

10+ Year Member



 
Msg#: 491 posted 3:42 am on Oct 25, 2003 (gmt 0)

jdMorgan, thanks as well.

Just reading the rules now.

Chris

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved