mod_setenvdnsbl : Apache module

| コメント(0) | トラックバック(0)

What is mod_setenvdnsbl

The mod_setenvdnsbl is an Apache module that looks up DNSBL requests for target IP address and set those results to environment variables. With this module, you can control access permission of black listed hosts.

Download files

mod_setenvdnsbl-0.1.tgz
4686 Bytes

How to install

  1. Download and extract mod_setenvdnsbl-0.1.tgz.
  2. Edit Makefile to change APXS variable to your apxs's path.
  3. Do make to build.
  4. Do make install to install.

Reference

SetEnvIfDNSBL directive

Description
Sets variables based on DNSBL result of target host
Syntax
SetEnvIfDNSBL attribute dns-suffix [!|*]env-variable[=value] [[!|*]env-variable[=value]] ...
Context
server config, virtual host, directory, .htaccess
Override
FileInfo

The SetEnvIfDNSBL directive sets variables based on DNSBL result of the attribute. The attribute can be one of following three things:

  1. An HTTP request header field whose value is an IP address. For example: Client-IP, X-Forwarded-For.
  2. One of the following aspects of the request:
    remote_addr
    The IP address of the client requesting.
    server_addr
    The IP address of the server on which received the request.
  3. The name of environment variables which are set by SetEnvIf directive.

The rest of the arguments the name of variables to set, and optionally how to set the value. These take the form of

  1. varname, or
  2. !varname, or
  3. varname=value, or
  4. *varname

In the first three forms, the SetEnvIfDNSBL directive will work like the SetEnvIfDirective when the target IP address is listed on DNSBL (the result of DNSBL request was one of local loopback addresses, 127.0.0.0/24). The fourth, this directive will set the result of DNSBL request when the result is not NXDOMAIN.

Example

SetEnvIfDNSBL remote_host bsb.spamlookup.net IS_SPAM
SetEnvIfDNSBL remote_host list.dsbl.org *DNSBLRESULT

Note

This directive generates a DNS request, so it may be a bottleneck of the response. You should write this directive on limited contexts, for example <Files> directive and <Location> directive.

トラックバック(0)

トラックバックURL: http://nesitive.net/mt/tbping/22

コメントする

このブログ記事について

このページは、necottieがJanuary 14, 2007 3:47 AMに書いたブログ記事です。

ひとつ前のブログ記事は「nsIHttpChannel sample/SimpleDownload」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。