Welcome to WebmasterWorld Guest from 54.196.77.14

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Blocking whois and dnsstuff

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

New User

10+ Year Member

joined:Aug 27, 2003
posts:30
votes: 0


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)

New User

10+ Year Member

joined:Aug 27, 2003
posts:30
votes: 0


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

Senior Member

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

joined:Mar 31, 2002
posts:25430
votes: 0


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