Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Banning by Host Name

     

creepychris

3:19 am on Oct 25, 2003 (gmt 0)

10+ Year Member



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

3:28 am on Oct 25, 2003 (gmt 0)

10+ Year Member



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

3:30 am on Oct 25, 2003 (gmt 0)

10+ Year Member



Thanks :) That was fast.

jdMorgan

3:37 am on Oct 25, 2003 (gmt 0)

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



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

3:42 am on Oct 25, 2003 (gmt 0)

10+ Year Member



jdMorgan, thanks as well.

Just reading the rules now.

Chris

 

Featured Threads

Hot Threads This Week

Hot Threads This Month