homepage Welcome to WebmasterWorld Guest from 54.167.179.48
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

    
Blocking whois and dnsstuff
1EightT

10+ Year Member



 
Msg#: 3434564 posted 5:28 pm on Aug 28, 2007 (gmt 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]

 

1EightT

10+ Year Member



 
Msg#: 3434564 posted 5:29 pm on Aug 28, 2007 (gmt 0)

The forum screwed up the formatting on the hosts.deny code. Sorry about that.

jdMorgan

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



 
Msg#: 3434564 posted 9:54 pm on Aug 28, 2007 (gmt 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

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