ourlil.com

A web site for tutti noi (all of us!)

  • Home
  • About
  • About – sample
  • Healing Christofer – Fun’-Raiser
    • Gallery
  • JP’s Page

Archive for the ‘httpd’ Category

How to nuke attackers via httpd.conf?

Tuesday, April 29th, 2008

How to nuke attackers via httpd.conf?That can be accomplished using mod_access “Deny from <envar>” with mod_setenvif testing REQUEST_URI or by using mod_rewrite:

RewriteRule (awstats\.pl¦xmlrpc\.php¦includer\.cgi¦hints\.pl)$ - [F]

Of course, the problem is that you’ll still be wasting bandwidth sending your custom 403 error page to these idiots.A work-around (stay with me here) is to do the following:Create a new subdirectory below web root.Place a custom 403 error page in that subdirectory. Lets call it “403.html” for now. Leave out all the HEAD content, and just put a few characters in this file, so you can recognize it by filesize when fetched — I use just the text “No.”Now create an .htaccess file in that subdirectory that contains the following:

ErrorDocument 403 /path_to_this_subdirectory/403.html
Options +FollowSymLinks
RewriteEngine onRewriteRule !^403\.html$ - [F]

Now, instead of the first code snippet I posted above, use the following in httpd.conf or in your web root .htaccess file:

RewriteRule (awstats\.pl¦xmlrpc\.php¦includer\.cgi¦hints\.pl)$ \
/path_to_subdirectory/$1 [L]

Now when a bad-bot attempts to fetch one of those files, it gets rewritten to the subdirectory. But no files in that subdirectory are allowed to be fetched except for 403.html. So, the 403 error handler is invoked, and returns only a 403-Forbidden server response header and the three-byte response from 403.html, thus minimizing your bandwidth loss.

Tags: apache, httpd, security
Posted in apache, httpd, security | Comments Off

Authenticate Apache 2 using Mac OS X Open Directory

Tuesday, October 30th, 2007

macosxhints.com – Authenticate Apache 2 using Mac OS X Open Directory

Change this:

cn=user1,dn=example,dn=com

to this:

uid=user1,dn=example,dn=com

so it looks like this:

AuthType Basic
AuthName "Testing of LDAP auth"
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPBindDN uid=testaccount1,cn=users,dc=geo,dc=vuw,dc=ac,dc=nz
AuthLDAPBindPassword [plaintext password for user 'testaccount1']
AuthLDAPURL ldap://server1.geo.vuw.ac.nz/dc=geo,dc=vuw,dc=ac,dc=nz
require valid-user

Clear as mud? ;-)

Posted in Unix, WebTech, apache, httpd, security, standards | Comments Off

hacks secure htaccess phpnuke code hacks PHP-Nuke modules, blocks, themes

Wednesday, October 10th, 2007

I may consider adding this to my personal server’s .htaccess file…

hacks secure htaccess phpnuke code hacks PHP-Nuke modules, blocks, themes

Posted in SPAM, apache, httpd | 2 Comments »

  •  

    March 2010
    S M T W T F S
    « Feb    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • Pages

    • About
    • About – sample
    • Healing Christofer – Fun’-Raiser
      • Gallery
    • JP’s Page
  • Archives

    • February 2010
    • November 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • December 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
  • Categories

  • Favorites

    Here're a few sites I like to visit:
    • WPMU.org
    • Holy Shmoly
    • AppleInsider.com
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

Copyright © 2010 - ourlil.com | Entries (RSS) | Comments (RSS)

WordPress theme designed by web design