![]() | Beatnik Web interface for DNS management |
![]() | Codelets An orphanage of source code |
![]() | mceOnlineVideos A secure YouTube and Google Video Plugin for TinyMCE |
![]() | ldap2dns Store your DNS records in LDAP |
![]() | PodMail Your Voicemail as a PodCast |
![]() | RealCLIP Real Estate Listings Portal |
![]() | Shout Manage your Asterisk PBX in a convenient Web UI |
![]() | Congregation The ultimate web account manager |
![]() | Asterisk::LDAP Store your Asterisk PBX configuration in LDAP |
![]() | CMap Cross Provider Online Map API |
DNSrrsetThe Resource Record Set represents all of the resource |
| ATTRIBUTE | VALUE | Comment |
|---|---|---|
| objectclass | DNSrrset | required |
| cn | common name | required |
| DNSdomainname | Name of this record | optional, relative to zonename |
| DNSipaddr | IP address | optional, mutivalued |
| DNScname | Canonical name | optional, without ending dot relative to zonename |
| DNSpreference | integer | optional, only used for MX records |
| DNStype | A, CNAME, NS, MX, PTR or TXT | must be any valid record type |
| DNSclass | IN | must be IN |
| DNSttl | time to live | optional, only used with tinydns |
| DNStimestamp | timestamp | optional, only used with tinydns |
| DNSsrvpriority | SRV Priority | optional, defaults to 0 for SRV records |
| DNSsrvweight | SRV Weight | optional, defaults to 0 for SRV records |
| DNSsrvport | SRV Port | Required for SRV records |
- DNSrrset: This object-class must be a direct child
of DNSzone. Its dn should be specified as
cn=domainname,cn=zonename,...
- DNSdomainname This is the partial domain-name, ie.
the part in front of the zone-name.
- DNSipaddr: This specifies the IP-address in dotted
format. It can be used for DNSrrset's of type
A, NS, MX or PTR. DNSipaddr is
multivalued to specifiy more than one IP-address for a
service. If used in DNSrrset's with DNStype = PTR it overrides the old-fashioned form used in
DNSdomainname such as 13.178.23.in-addr.arpa for
reverse lookups.
- DNScname: Whenever there is a mapping of a
domain-name to a canonical name, use this attribute.
DNScname may be used for DNSrrset's with
DNStype CNAME, NS, MX, PTR or TXT. If the last
character of a CNAME is a dot its name is considered
absolute. If it does not contain a dot, its name is
prepended to the zone-name.
- DNSpreference: This number is the mail-exchange
preference as used by BIND.
- DNStype: This must be A, CNAME, NS, MX, PTR or TXT. It specifies the DNSrrset type.
- DNSclass: Must be IN
- DNSttl: This is the time-to-live value as used by
tinydns. If TTL is non-zero (or omitted), the
time-stamp is a starting time from where-on this zone's
information is valid. If TTL is zero, the timestamp is an
ending time (``time to die'').
- DNStimestamp: This is the timestamp as used by
tinydns. It represents a string as external TAI64
time-stamp, printed as 16 lowercase hexadecimal
characters
- DNSsrvpriority: Integer representing the relative
priority of this DNS SRV record. See menandmice.com for more information about DNS SRV
records.
- DNSsrvweight: DNS SRV record weight field. Integer
- DNSsrvport: DNS SRV record port number. Integer
ldap2dns and ldap2dnsd recognize the following options:
-D binddn specify the distinguished name to bind to the LDAP directoryldap2dns and ldap2dnsd recognize the following
-w bindpasswd use bindpasswd as password for simple authentication
-b searchbase use searchbase as starting point for search instead default
-o data generate a "data" file to be processed by tinydns-data
-o db for each zone generate a ".db" file to be used by named
-L[filename] print output in LDIF format to [filename] or stdout for reimport
-h host specify the hostname of LDAP directory. Default is localhost
-p port portnumber to connect to LDAP directory. Defaults is 389
-H ldapURI URI for LDAP server (examples: ldap://hostname or ldaps://hostname:636)
-v run in verbose mode
-vv even more verbose
-V print version and exit
-u numsecs update DNS data every numsecs.
-t timeout timeout for LDAP searches, in seconds
-M reclimit Limit LDAP results to reclimit number of records.
environment variables:
TINYDNSDIR: Specifies the directory where ldap2dns
writes its data file.
LDAP2DNS_UPDATE: Specifies the update intervall as the
-u command line option would.
LDAP2DNS_OUTPUT: Specifies the default output, as the
-o command line option would. ldap2dns and
ldap2dnsd use the following parameters from
/etc/ldap.conf if not specified on the command line:
BASE: The LDAP search base.
HOST: The LDAP server.
PORT: The LDAP port.
If You are a tinydns user, run ldap2dns in
/services/tinydns/root.
If You are an openldap user, the command line switches are
the same as for ldapsearch or ldapadd.
$ ldap2dns -D "binddn" [ -w passwd ] -b "searchbase" \This generates a data file which is converted into a data.cdb
-o data -e "cd /var/tinydns/root && /usr/bin/tinydns-data"
by tinydns-data as soon as ldap2dns detects a modification in the
LDAP directory. The password is required if You restrict read
queries to authenticated users only. Test with
$ dnsq any corp.local ipaddrReplace ipaddr with whatever You configured tinydns to
listen to. If You are a BIND user, run ldap2dns in
/var/named with
$ ldap2dns -D "binddn" -w passwd -b "searchbase" \Do not forget to add You primary definition to your
-o db -e "kill -HUP `cat /var/run/named-pid`"
named.conf file. Your named should be restarted automatically as
soon as ldap2dns detects a modification in the LDAP directory. If
bind is not restarted, do so with
# kill -HUP PIDNow run
$ nslookup - localhostNote that nslookup only works with tinydns if
> ns1.corp.local
your nameserver resolves its IP-address backwards.
When ldap2dns is invoked as
ldap2dnsd, the program starts as backgound-daemon and
continuously checks for modifications in the LDAP directory.
If the the daemon sees a modification in the DNSserial numbers it updates the data or .db files, depending what kind
of output was configured. This check is done about once a
minute and is configurable.
The command-line options for ldap2dnsd are the same as
for ldap2dns. Use the -u option to modify the update
interval. You may also use -u on ldap2dns to start as
a foreground daemon. This is useful if You want to run
ldap2dns from daemontools.
These instructions assume you will be running ldap2dns under daemontoolsb> and that tinydns is also
running under daemontools. These instructions also assume you
are using Dan Bernstein's standard directory locations. Make
sure you change the below examples to match your
environment.
Start by creating the a non-root user to run your ldap2dns
and associated logging mechanism:
# groupadd -r ldap2dns
# useradd -r -d /dev/null -s /bin/false -c "ldap2dns Daemon" \
-g ldap2dns ldap2dns
# groupadd -r l2dnslog
# useradd -r -d /dev/null -s /bin/false -c "ldap2dns Logger" \
-g l2dnslog l2dnslog
Next configure the ldap2dns area to be managed by
daemontools. Typically this is /etc/ldap2dns
# cd /etcThe syntax is close to tinydns-conf except that you will also
# ldap2tinydns-conf ldap2dns l2dnslog /etc/ldap2dns /etc/tinydns/root
need to specify the path to the root directory for tinydns.
This is the directory that holds the data file.
Next edit the file /etc/ldap2dns/run and optionally
the environment variables in /etc/ldap2dns/env as
necessary for your environment. This may include configuring
a base DN, a bind DN, a password, and an interval.
When everything is ready configured properly create a symlink
from /etc/ldap2dns into /service. This action
will cause daemontools to launch ldap2dns.
# ln -s /etc/ldap2dns /service/ldap2dnsAfter a few seconds daemontools starts
ldap2dnsd which itself generates data files whenever a
modification is commited into the LDAP directory. A perl-script import.pl is contained
in this package. Edit the first lines of the script to
conform to Your configuration. If You have installed the Perl
packages Net::LDAP and Net::DNS skip the following lines,
otherwise do
# perl -MCPAN -e 'shell'Now check that Your nameserver allows zone transfers to your
(...snip...)
> install Net::DNS
> install Net::LDAP
host and run the import script:
$ echo 'primary mydomain.org ' | ./import.plfor a single domain or
# cat named.boot | ./import.plto populate Your LDAP directory. Use the supplied data2ldap.pl in the
scripts/ directory
$ data2ldap.pl data data.ldif ou=DNS,dc=example,dc=comMore to come...
A browser-based administration toolkit,
which connects directly to the LDAP-directory service.
- Write a man page.
- named.conf should be created automatically.
Rief and 2005-2006 Ben Klang
This program is licensed under the GPL version 2
ldap2dns was originally written by Jacob Rief
(jacob.rief@tiscover.com). It is now maintained by Ben Klang
(bklang@alkaloid.net). If you run ldap2dns on a
production nameserver, please send the maintainer an email
and mention on what OS and with which nameserver you do
so.
Disclaimer: The author and all contributors
disclaim any kind of warranty or liability or suitability for
any purpose. By running this software you agree that you are
a competent systems administrator and will bear the
responsibility for your actions.
Latest Release: ldap2dns
version 0.4.1
Released October 19, 2006ChangeLog
Developer Access:
The bleeding edge of ldap2dns is in the AlkaloidNetworks subversion repository found at https://svn.alkaloid.net/gpl/ldap2dns/trunk.
Following the Subversion standard, releases are kept in
/gpl/ldap2dns/tags and branches are in
/gpl/ldap2dns/branches.





