NameDateSize

..30-Apr-201913

dlz_mysqldyn_mod.cH A D27-Jan-202339.2 KiB

MakefileH A D21-Feb-20241.7 KiB

READMEH A D22-Feb-20243.4 KiB

testing/H24-Sep-20227

README

1<!--
2Copyright Internet Systems Consortium, Inc. ("ISC")
3
4This Source Code Form is subject to the terms of the Mozilla Public
5License, v. 2.0. If a copy of the MPL was not distributed with this
6file, you can obtain one at https://mozilla.org/MPL/2.0/.
7
8Copyright (C) Stichting NLnet, Netherlands, stichting@nlnet.nl.
9
10The development of Dynamically Loadable Zones (DLZ) for Bind 9 was
11conceived and contributed by Rob Butler.
12
13SPDX-License-Identifier: ISC and MPL-2.0
14
15Permission to use, copy, modify, and distribute this software for any purpose
16with or without fee is hereby granted, provided that the above copyright
17notice and this permission notice appear in all copies.
18
19THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET DISCLAIMS ALL WARRANTIES
20WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
21MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL STICHTING NLNET BE LIABLE FOR
22ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
23WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
24OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
25CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26-->
27
28BIND 9 DLZ MySQL module with support for dynamic DNS (DDNS)
29
30Adapted from code contributed by Marty Lee, Maui Systems Ltd.
31
32This is a dynamically loadable zone (DLZ) plugin that uses a fixed-
33schema MySQL database for back-end storage. It allows zone data
34to be updated via dynamic DNS updates, and sends DNS NOTIFY packets
35to other name servers when appropriate.
36
37The database for this module uses the following schema:
38
39    CREATE TABLE `Zones` (
40        `id` int(11) NOT NULL AUTO_INCREMENT,
41        `domain` varchar(128) NOT NULL DEFAULT '',
42        `host` varchar(128) NOT NULL DEFAULT '',
43        `admin` varchar(128) NOT NULL DEFAULT '',
44        `serial` int(11) NOT NULL DEFAULT '1',
45        `expire` int(11) NOT NULL DEFAULT '86400',
46        `refresh` int(11) NOT NULL DEFAULT '86400',
47        `retry` int(11) NOT NULL DEFAULT '86400',
48        `minimum` int(11) NOT NULL DEFAULT '86400',
49        `ttl` int(11) NOT NULL DEFAULT '86400',
50        `writeable` tinyint(1) NOT NULL DEFAULT '0',
51        PRIMARY KEY (`id`),
52        KEY `domain_idx` (`domain`)
53    );
54
55    CREATE TABLE `ZoneData` (
56        `id` int(11) NOT NULL AUTO_INCREMENT,
57        `zone_id` int(11) NOT NULL,
58        `name` varchar(128) NOT NULL DEFAULT '',
59        `type` varchar(16) NOT NULL DEFAULT '',
60        `ttl` int(11) NOT NULL DEFAULT '86400',
61        `data` varchar(128) NOT NULL DEFAULT '',
62        PRIMARY KEY (`id`),
63        KEY `zone_idx` (`zone_id`),
64        KEY `name_idx` (`zone_id`, `name`),
65        KEY `type_idx` (`type`)
66    );
67
68'Zones' contains information about specific zones:
69 - domain: the zone name
70 - admin: the zone administrator
71 - serial, expire, reresh, retry, minimum: values in the SOA record
72 - ttl: default zone TTL
73 - writeable: set to true if the zone can be updated via DDNS
74
75'ZoneData' contains the individual records within the zone:
76 - zone_id: the 'id' from the corresponding record in Zones
77 - name: domain name, relative to the zone apex. (Data at the zone
78   apex itself may use a blank name or "@".)
79 - type: the RR type, expressed as text
80 - ttl: the record's TTL
81 - data: the records rdata, expressed as text.
82
83To configure this module in named.conf:
84
85dlz "mysqldlz" {
86    database "dlopen <path to>/dlz_mysqldyn_mod.so <dbname> [dbhost [dbuser [dbpass]]]";
87};
88