Welcome to WebmasterWorld Guest from 54.162.157.249

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Blocking whois and dnsstuff

     
5:28 pm on Aug 28, 2007 (gmt 0)

10+ Year Member



I would like to block both dnsstuff.com and #*$! from my server, but i'm running into a wall actually doing it. So far i've tried the following:

This is in my hosts.deny on my server:

ALL: .xyz, .xyz, .dnsstuff.com, .xyz

This is in my httpd.conf for the directory in question:

RewriteCond %{HTTP_USER_AGENT} ^whois [OR]
RewriteCond %{HTTP_USER_AGENT} ^dnsstuff [OR]
RewriteRule /*$ http://www.spam.com [L,R]

RewriteCond %{HTTP_REFERER} whois\.sc [NC]
RewriteCond %{HTTP_REFERER} dnsstuff\.com [NC]
RewriteRule .* - [F]

What the heck am I doing wrong here?

[edited by: jdMorgan at 9:51 pm (utc) on Aug. 28, 2007]
[edit reason] de-linked [/edit]

5:29 pm on Aug 28, 2007 (gmt 0)

10+ Year Member



The forum screwed up the formatting on the hosts.deny code. Sorry about that.
9:54 pm on Aug 28, 2007 (gmt 0)

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



Whether there is a 'problem' with this code depends on what exactly you're expecting it to do. So what were your test results and how did they differ from your requirements and expectations?

Are you trying to block clients referred from these domains, or trying to block accesses by servers at those domains?

Jim

 

Featured Threads

Hot Threads This Week

Hot Threads This Month