Skip to content

Setup OpenDirectory as DNS

In this tutorial, you will learn how to create public DNS records in OpenDirectory which can be queried by client machines.

Step 1: Create DNS record in OpenDirectory

Select the ou=public entry on the left-hand tree menu. Click Create a child entry, then select Generic: DNS Entry.

Fill in the required information:

  • cn: the fully-qualified domain name to be resolved (e.g. blah or blah.example.opendirectory.net)
  • ipHostNumber: IP address of the domain

Press Create Object to finish.

Step 2: Install required client software

On Debian Linux systems, this can be accomplished by setting up libnss-ldapd:

sudo apt install libnss-ldapd

You will then be prompted for the LDAP server information: Specify the server URI Specify the search base Include LDAP for host lookups

Be sure to include hosts on the services to be configured screen.

Check your operating system's documentation for further information.

Step 3: Test

You will now be able to test DNS lookups from the client system using any common utility.

$ ping blah

PING blah (10.10.0.40) 56(84) bytes of data.
64 bytes from blah (10.10.0.40): icmp_seq=1 ttl=64 time=0.165 ms
64 bytes from blah (10.10.0.40): icmp_seq=2 ttl=64 time=0.576 ms
64 bytes from blah (10.10.0.40): icmp_seq=3 ttl=64 time=0.118 ms
64 bytes from blah (10.10.0.40): icmp_seq=4 ttl=64 time=0.158 ms
^C
--- blah ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.118/0.254/0.576/0.186 ms