bind9-ldap - Domain Name System server, resolver library, and related tools ChangeLog


# ISC bind 9.2.2 w/ LDAP sdb
# ==============
# Prerequisites:
# OpenSSL 0.9.6e or higher

test -f installed/bind-9.2.2.tar.gz && mv installed/bind-9.2.2.tar.gz .
test ! -f bind-9.2.2.tar.gz &&

# Verify tarball w/ gpg:
gpg --list-keys 51BAB2ED > /dev/null 2>&1 || gpg --recv-keys 51BAB2ED
wget &&
gpg --verify bind-9.2.2.tar.gz.asc && rm bind-9.2.2.tar.gz.asc

cd /usr/local/src
find -type d -maxdepth 1 -name "bind-*" -exec rm -r {} \;
tar xzvf ~/bind-9.2.2.tar.gz
cd bind-9.2.2
chown -R root.root .

# Patch the source to set it up for LDAP sdb:
rm -f ~/installed/bind-*-ldap-sdb.patch
patch -p1 < ./bind-9.2.2-ldap-sdb.patch &&
mv bind-9.2.2-ldap-sdb.patch ~/installed/

./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-threads \
removepkg bind
make install

# zone2ldap: import a zone file into an LDAP db
cd contrib/sdb/ldap
gcc -g `../../../ --cflags isc dns` -c zone2ldap.c
gcc -g -o zone2ldap zone2ldap.o `../../../ --libs isc dns`\
-lldap -llber -lresolv
cp zone2ldap /usr/local/bin/
cp zone2ldap.1 /usr/local/man/man1/

mkdir -p installed
rm -f installed/bind-*.tar.*
mv bind-9.2.2.tar.gz installed/

# Add the dNSZone schema to OpenLDAP
test -d /usr/local/etc/openldap/schema &&
( cd /usr/local/etc/openldap/schema ; \
wget -N )
# Open up slapd.conf in a text editor and make sure you have this line:
include /usr/local/etc/openldap/schema/cosine.schema
# and now this line:
include /usr/local/etc/openldap/schema/dnszone-schema.txt
# Kill slapd (and slurpd if this is a master) and restart it (and slurpd...)

# Add ou=dns to the LDAP db
# I also add ou=internal,ou=dns and ou=external,ou=dns for views
cd /usr/local/etc/openldap
echo "dn: ou=dns,dc=foo,dc=org" > ldif.add
echo "objectClass: organizationalUnit" >> ldif.add
echo "ou: dns" >> ldif.add
echo >> ldif.add
echo "dn: ou=internal,ou=dns,dc=foo,dc=org" >> ldif.add
echo "objectClass: organizationalUnit" >> ldif.add
echo "ou: internal" >> ldif.add
echo >> ldif.add
echo "dn: ou=external,ou=dns,dc=foo,dc=org" >> ldif.add
echo "objectClass: organizationalUnit" >> ldif.add
echo "ou: external" >> ldif.add
ldapadd -x -D "cn=Manager,dc=foo,dc=org" -W -f ldif.add

# Inport a zone file into LDAP (one that isn't already there (-c)):
zone2ldap -D cn=manager,dc=foo,dc=org -w secret -h localhost \
-z -b ou=internal,ou=dns,dc=foo,dc=org \
-f /var/named/master/internal/ -c

# Set it up in named.conf.  Replace the nornal file line with this:
#file "master/internal/";
database "ldap ldap://,dc=com,ou=internal,ou=dns,dc=foo,dc=org 172800";

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2003-04-11 1:50pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.