Michael Robinton > Net-Bind-rbldnsdAccessor-0.05 > Net::Bind::rbldnsdAccessor

Download:
Net-Bind-rbldnsdAccessor-0.05.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.05   Source  

NAME ^

Net::Bind::rbldnsdAccessor - access rbldnsd files with Perl or BIND

SYNOPSIS ^

  use Net::Bind::rbldnsdAccessor qw(
        :isc_constants
        cons_str
        rblf_create_zone
        rblf_query
        rblf_next_answer
        rblf_reinit
  );    

DESCRIPTION ^

Net::Bind::rbldnsdAccessor provides direct access to rbldnsd data files with Perl and BIND-9.1+. The build process creates a library file suitable for use with BIND 9.1+ that allows the named daemon to directly access rbldnsd files and use the same memory caching methods for those records to reduce the storage requirements for large DNSBL zones by several orders of magnitude.

i.e. The spamcannibal zone file as of this writing consumes 300 megs of memory when loaded into BIND. It consumes under 400k of memory loaded into rbldnsd. When compiled into BIND, rbldnsdaccessor extension checks for zonefile updates every 60 seconds.

The available Perl functions are as follows:

INSTALLATION ^

  1)    Perl Makefile.PL
  2)    enter the full path to {/rbldnsd/source/directory}
  3)    make
  4)    make test
  5)    make install ONLY if building for Perl

Complete these steps only if building for BIND.

In the source tree:

  6)    copy librbldnsdaccessor.a, rbldnsdaccessor.c, and
        rbldnsdaccessor.h to {/bind/source/directory}/bin/named
  7)    Alter {/bind/source/directory}/bin/named/Makefile.in.
        Add rbldnsdaccessor.@O@ and librbldnsdaccessor.@A@
        to DBDRIVER_OBJS

        IF you have included compression/decompression support
        (zlib) then you also need to add something like -lz
        to DBDRIVER_LIBS and you may need to add the linker
        path (-L/usr/local/lib) or similar as well as
        (-I/usr/local/includes) to DBDRIVER_INCLUDES depending
        where zlib is installed on your system.

  8)    Alter {/bind/source/directory}/bin/named/main.c
        below where it says "#include "xxdb.h" add the
        line "#include "rbldnsdaccessor.h"". Below where
        it says "xxdb_init();", add the line "rbldnsd_init();", 
        and finally below where is says "xxdb_clear" add,
        add the line "rbldnsd_clear();"

Now you should hopefully be able to build as usual; first configure and then make.

BIND CONFIGURATION FILE ENTRY ^

The syntax of the bind configuration file entry for using rbldnsd files is as follows:

  zone "my.zonename.com" {
        type master;
        database "rbldnsd zone-type filelist ...";
  };

Where the zone-type is one of:

        ip4set
        ip4trie
        ip4tset
        dnset
        generic
        combined

See the rbldnsd documentation for specific information about the zone-types and file formats.

EXPORT_OK ^

        :isc_constants
        cons_str
        rblf_create_zone
        rblf_query
        rblf_next_answer
        rblf_reinit

PREREQUISITES ^

        for testing:
          Net::DNS::Codes
          Net::DNS::ToolKit

        source for rbldnsd-0.996a or better

        [optionally] source for bind-9.1.0+

The documents with BIND suggest that 9.1.0 has the necessary api to work with librbldnsdaccessor.a. This has only been tested against BIND-9.3.2-P1

COPYRIGHT and LICENSE ^

 Copyright 2006, Michael Robinton, michael@bizsystems.com

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

AUTHOR ^

Michael Robinton <michael@bizsystems.com>

See BIND 9 documentation, man rbldnsd ^

syntax highlighting: