README
1BIND 9 DLZ MySQL module with support for dynamic DNS (DDNS)
2
3Adapted from code contributed by Marty Lee, Maui Systems Ltd.
4
5This is a dynamically loadable zone (DLZ) plugin that uses a fixed-
6schema MySQL database for back-end storage. It allows zone data
7to be updated via dynamic DNS updates, and sends DNS NOTIFY packets
8to other name servers when appropriate.
9
10The database for this module uses the following schema:
11
12 CREATE TABLE `Zones` (
13 `id` int(11) NOT NULL AUTO_INCREMENT,
14 `domain` varchar(128) NOT NULL DEFAULT '',
15 `host` varchar(128) NOT NULL DEFAULT '',
16 `admin` varchar(128) NOT NULL DEFAULT '',
17 `serial` int(11) NOT NULL DEFAULT '1',
18 `expire` int(11) NOT NULL DEFAULT '86400',
19 `refresh` int(11) NOT NULL DEFAULT '86400',
20 `retry` int(11) NOT NULL DEFAULT '86400',
21 `minimum` int(11) NOT NULL DEFAULT '86400',
22 `ttl` int(11) NOT NULL DEFAULT '86400',
23 `writeable` tinyint(1) NOT NULL DEFAULT '0',
24 PRIMARY KEY (`id`),
25 KEY `domain_idx` (`domain`)
26 );
27
28 CREATE TABLE `ZoneData` (
29 `id` int(11) NOT NULL AUTO_INCREMENT,
30 `zone_id` int(11) NOT NULL,
31 `name` varchar(128) NOT NULL DEFAULT '',
32 `type` varchar(16) NOT NULL DEFAULT '',
33 `ttl` int(11) NOT NULL DEFAULT '86400',
34 `data` varchar(128) NOT NULL DEFAULT '',
35 PRIMARY KEY (`id`),
36 KEY `zone_idx` (`zone_id`),
37 KEY `name_idx` (`zone_id`, `name`),
38 KEY `type_idx` (`type`)
39 );
40
41'Zones' contains information about specific zones:
42 - domain: the zone name
43 - admin: the zone administrator
44 - serial, expire, reresh, retry, minimum: values in the SOA record
45 - ttl: default zone TTL
46 - writeable: set to true if the zone can be updated via DDNS
47
48'ZoneData' contains the individual records within the zone:
49 - zone_id: the 'id' from the corresponding record in Zones
50 - name: domain name, relative to the zone apex. (Data at the zone
51 apex itself may use a blank name or "@".)
52 - type: the RR type, expressed as text
53 - ttl: the record's TTL
54 - data: the records rdata, expressed as text.
55
56To configure this module in named.conf:
57
58dlz "mysqldlz" {
59 database "dlopen <path to>/dlz_mysqldyn_mod.so <dbname> [dbhost [dbuser [dbpass]]]";
60};
61