68
62
records, MaraDNS can be configured thusly:
71
<li>We run MaraDNS server on one IP and a Deadwood server on another IP.
65
<li>We run two servers of MaraDNS on two different IPs.
72
66
<li>For the sake of this example, we will suppose that the server
73
people send queries to for resolving hostnames has the IP 192.168.1.1,
74
which will be running Deadwood.
75
We will further suppose that there is a MaraDNS server which has the dangling
67
people send queries to for resolving hostnames has the IP 192.168.1.1.
68
We will further suppose that there is a server which has the dangling
76
69
CNAME issue with the IP 192.168.1.2
77
<li>Set up 192.168.1.1 to use 192.168.1.2 to resolve all hostnames that end
78
in, say, "example.com.", via the upstream_servers dwood3rc variable.
79
<li>Set up 192.168.1.2 to have dangling CNAME records in the
70
<li>Set up 192.168.1.1 to use 192.168.1.2 as an upstream server by the use
71
of the upstream_servers mararc variable.
72
<li>Set up 192.168.1.2 to be both an authoritative and recursive DNS server,
73
and have dangling CNAME records in the authoritative half.
83
76
This will cause dangling CNAME records to be fully resolved; here is
87
80
<li>A stub resolver asks 192.168.1.1 the IP address for, say
88
81
"google.example.com"
89
<li>192.168.1.1 asks 192.168.1.2 the IP address for "google.example.com" (since
90
the name ends in "example.com")
82
<li>192.168.1.1 asks 192.168.1.2 the IP address for "google.example.com"
91
83
<li>192.168.1.2 tells 192.168.1.1 "google.example.com is a CNAME for
92
84
www.google.com, and I don't have an IP for it"
93
85
<li>192.168.1.1, seeing that it has a CNAME without an IP, asks
94
nameservers on the internet for the IP for "www.google.com"
95
<li>When 192.168.1.1 has a complete record, it will send this record to
86
192.168.1.2 the IP for "www.google.com"
87
<li>192.168.1.2 recursively resolves the IP for www.google.com, and gives
88
this IP for 192.168.1.1
89
<li>Now that 192.168.1.1 has a complete record, it will send this record to
96
90
the stub resolver. In other words, 192.168.1.1 will tell the stub
97
91
resolver that google.example.com is a CNAME for www.google.com, and then
98
92
give out the IP for www.google.com.
101
Here is an example <tt>dwood3rc</tt> file for 192.168.1.1:
95
Here is an example <tt>mararc</tt> file for 192.168.1.1:
104
98
ipv4_bind_addresses = "192.168.1.1"
105
99
chroot_dir = "/etc/maradns"
106
100
recursive_acl = "192.168.1.0/24"
107
upstream_servers = {}
108
upstream_servers["example.com."] = "192.168.1.2"
101
upstream_servers = "192.168.1.2"
111
104
Here is an example <tt>mararc</tt> file for 192.168.1.2:
114
107
ipv4_bind_addresses = "192.168.1.2"
115
108
chroot_dir = "/etc/maradns"
109
recursive_acl = "192.168.1.1"
117
111
csv2["example.com."] = "db.example.com"
120
114
If dangling CNAMEs are not an issue for a given setup, or if they are
121
resolved by the above setup using both MaraDNS and Deadwood, the warnings
115
resolved by the above setup with two instances of MaraDNS, the warnings
122
116
about dangling CNAMEs can be turned off by adding this to a mararc file: