2. Run: make
3. Run: sudo make install # this will install dlz_bdbhpt_dynamic.so
into /usr/lib/bind9/
-4. Add a DLZ statement similar to the example shown in
- example/dlz.conf into your Bind configuration
+4. Add a DLZ statement similar to the example below into your
+ Bind configuration
5. Ensure your BerkeleyDB home-directory exists and can be written to
by the bind user
-6. If you're running an AppArmor enabled Bind, consider adding content
- included within example/apparmor.d-local-usr.sbin.named within
- /etc/apparmor.d/local/usr.sbin.named
-7. Use the included testing/bdbhpt-populate.pl script to provide some
+6. Use the included testing/bdbhpt-populate.pl script to provide some
data for initial testing
Usage
--- /dev/null
+These files were used for testing on Ubuntu Linux using BDB 5.1 and
+BerkeleyDB 0.54 for perl.
+
+- Populate the database from dns-data.txt for zone example.com:
+
+ perl bdbhpt-populate.pl \
+ --bdb=test.db --input=dns-data.txt --zones=example.com
+
+- Run "named -g -c named.conf"
+
+BDB server is now loaded with example.com data from the file test.db
# Name TTL Type Data
@ 3600 SOA ns1.%zone%. root.%zone%. 2012071700 604800 86400 2419200 10800
-@ 3600 NS ns1.%zone%
-@ 3600 MX 5 mx1.%zone%
-@ 3600 MX 10 mx2.%zone%
+@ 3600 NS ns1.%zone%.
+@ 3600 MX 5 mx1.%zone%.
+@ 3600 MX 10 mx2.%zone%.
@ 3600 TXT This zone brought to you by %driver%!
jabber 3600 A 127.0.0.1
mx1 3600 A 127.0.0.2
voip 3600 A 127.0.0.6
www 3600 CNAME www1.%zone%
www1 3600 A 127.0.0.7
-_sip._udp 3600 SRV 5 0 5060 voip.%zone%
-_jabber._tcp 3600 SRV 5 0 5269 jabber.%zone%
-_xmpp-client._tcp 3600 SRV 5 0 5222 jabber.%zone%
-_xmpp-server._tcp 3600 SRV 5 0 5269 jabber.%zone%
+_sip._udp 3600 SRV 5 0 5060 voip.%zone%.
+_jabber._tcp 3600 SRV 5 0 5269 jabber.%zone%.
+_xmpp-client._tcp 3600 SRV 5 0 5222 jabber.%zone%.
+_xmpp-server._tcp 3600 SRV 5 0 5269 jabber.%zone%.
--- /dev/null
+/*
+ * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+controls { };
+
+options {
+ directory ".";
+ port 5300;
+ pid-file "named.pid";
+ session-keyfile "session.key";
+ listen-on { any; };
+ listen-on-v6 { none; };
+ recursion no;
+};
+
+key rndc_key {
+ secret "1234abcd8765";
+ algorithm hmac-md5;
+};
+
+controls {
+ inet 127.0.0.1 port 9953 allow { any; } keys { rndc_key; };
+};
+
+dlz "bdbhpt_dynamic" {
+ database "dlopen ../dlz_bdbhpt_dynamic.so T . test.db";
+};