29
33
not resolvable by some stub resolvers. In order to resolve
30
34
dangling CNAME records, MaraDNS can be configured thusly:
32
* We run two servers of MaraDNS on two different IPs.
36
* We run MaraDNS server on one IP and a Deadwood server on
33
38
* For the sake of this example, we will suppose that the
34
39
server people send queries to for resolving hostnames has
35
the IP 192.168.1.1. We will further suppose that there is a
36
server which has the dangling CNAME issue with the IP
38
* Set up 192.168.1.1 to use 192.168.1.2 as an upstream server
39
by the use of the upstream_servers mararc variable.
40
* Set up 192.168.1.2 to be both an authoritative and recursive
41
DNS server, and have dangling CNAME records in the
40
the IP 192.168.1.1, which will be running Deadwood. We will
41
further suppose that there is a MaraDNS server which has the
42
dangling CNAME issue with the IP 192.168.1.2
43
* Set up 192.168.1.1 to use 192.168.1.2 to resolve all
44
hostnames that end in, say, "example.com.", via the
45
upstream_servers dwood3rc variable.
46
* Set up 192.168.1.2 to have dangling CNAME records in the
42
47
authoritative half.
44
49
This will cause dangling CNAME records to be fully resolved;
48
53
1. A stub resolver asks 192.168.1.1 the IP address for, say
49
54
"google.example.com"
50
55
2. 192.168.1.1 asks 192.168.1.2 the IP address for
56
"google.example.com" (since the name ends in "example.com")
52
57
3. 192.168.1.2 tells 192.168.1.1 "google.example.com is a CNAME
53
58
for www.google.com, and I don't have an IP for it"
54
59
4. 192.168.1.1, seeing that it has a CNAME without an IP, asks
55
192.168.1.2 the IP for "www.google.com"
56
5. 192.168.1.2 recursively resolves the IP for www.google.com,
57
and gives this IP for 192.168.1.1
58
6. Now that 192.168.1.1 has a complete record, it will send
59
this record to the stub resolver. In other words,
60
192.168.1.1 will tell the stub resolver that
61
google.example.com is a CNAME for www.google.com, and then
62
give out the IP for www.google.com.
60
nameservers on the internet for the IP for "www.google.com"
61
5. When 192.168.1.1 has a complete record, it will send this
62
record to the stub resolver. In other words, 192.168.1.1
63
will tell the stub resolver that google.example.com is a
64
CNAME for www.google.com, and then give out the IP for
64
Here is an example mararc file for 192.168.1.1:
67
Here is an example dwood3rc file for 192.168.1.1:
66
69
ipv4_bind_addresses = "192.168.1.1"
67
70
chroot_dir = "/etc/maradns"
68
71
recursive_acl = "192.168.1.0/24"
69
upstream_servers = "192.168.1.2"
73
upstream_servers["example.com."] = "192.168.1.2"
71
75
Here is an example mararc file for 192.168.1.2:
73
77
ipv4_bind_addresses = "192.168.1.2"
74
78
chroot_dir = "/etc/maradns"
75
recursive_acl = "192.168.1.1"
77
80
csv2["example.com."] = "db.example.com"
79
82
If dangling CNAMEs are not an issue for a given setup, or if
80
they are resolved by the above setup with two instances of
81
MaraDNS, the warnings about dangling CNAMEs can be turned off by
82
adding this to a mararc file:
83
they are resolved by the above setup using both MaraDNS and
84
Deadwood, the warnings about dangling CNAMEs can be turned off
85
by adding this to a mararc file:
84
87
no_cname_warnings = 1