ddns.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY mdash "&#x2014;" >
  5. ]>
  6. <chapter id="dhcp-ddns-server">
  7. <title>The DHCP-DDNS Server</title>
  8. <para>
  9. The DHCP-DDNS Server (kea-dhcp-ddns, known informally as D2) conducts the client side of
  10. the DDNS protocol (defined in RFC 2136) on behalf of the DHCPv4 and DHCPv6
  11. servers (kea-dhcp4 and kea-dhcp6 respectively). The DHCP servers construct
  12. DDNS update requests, known as NameChangeRequests (NCRs), based upon DHCP
  13. lease change events and then post these to D2. D2 attempts to match
  14. each such request to the appropriate DNS server(s) and carry out the
  15. necessary conversation with those servers to update the DNS data.
  16. </para>
  17. <para>
  18. In order to match a request to the appropriate DNS servers, D2 must have a
  19. catalog of servers from which to select. In fact, D2 has two such catalogs,
  20. one for forward DNS and one for reverse DNS; these catalogs are referred
  21. to as DDNS Domain Lists. Each list consists of one or more named DDNS
  22. Domains. Further, each DDNS Domain has a list of one or more DNS
  23. servers that publish the DNS data for that domain.
  24. </para>
  25. <para>
  26. When conducting forward domain matching, D2 will compare the FQDN in
  27. the request against the name of each forward DDNS Domain. The domain
  28. whose name matches the longest portion of the FQDN is considered the
  29. best match. For example, if the FQDN is "myhost.sample.example.com.",
  30. and there are two forward domains in the catalog: "sample.example.com."
  31. and "example.com.", the former is regarded as the best match. In some
  32. cases, it may not be possible to find a suitable match. Given the same two
  33. forward domains there would be no match for the FQDN, "bogus.net", so the
  34. request would be rejected. Finally, if there are no forward DDNS Domains
  35. defined, D2 will simply disregard the forward update portion of requests.
  36. </para>
  37. <para>
  38. When conducting reverse domain matching, D2 constructs a reverse
  39. FQDN from the lease address in the request and compare that against
  40. the name of each reverse DDNS Domain. Again, the domain whose name matches
  41. the longest portion of the FQDN is considered the best match. For instance,
  42. if the lease address is "172.16.1.40" and there are two reverse domains in
  43. the catalog: "1.16.172.in-addr.arpa." and "16.172.in-addr.arpa", the
  44. former is the best match. As with forward matching, it is possible to not
  45. find a suitable match. Given the same two domains, there would be no
  46. match for the lease address, "192.168.1.50", and the request would be
  47. rejected. Finally, if there are no reverse DDNS Domains defined, D2 will
  48. simply disregard the reverse update portion of requests.
  49. </para>
  50. <section id="dhcp-ddns-server-start-stop">
  51. <title>Starting and Stopping the DHCP-DDNS Server</title>
  52. <para>
  53. <command>kea-dhcp-ddns</command> is the Kea DHCP-DDNS server
  54. and, due to the nature of DDNS, it is run alongside either the
  55. DHCPv4 or DHCPv6 components (or both). Like other parts of
  56. Kea, it is a separate binary that can be run on its own or through
  57. <command>keactrl</command> (see <xref linkend="keactrl"/>). In
  58. normal operation, controlling <command>kea-dhcp-ddns</command>
  59. with <command>keactrl</command> is recommended. However, it is also
  60. possible to run the DHCP-DDNS server directly. It accepts the
  61. following command-line switches:
  62. </para>
  63. <itemizedlist>
  64. <listitem>
  65. <simpara>
  66. <command>-c <replaceable>file</replaceable></command> -
  67. specifies the configuration file. This is the only mandatory
  68. switch.</simpara>
  69. </listitem>
  70. <listitem>
  71. <simpara>
  72. <command>-d</command> - specifies whether the server
  73. logging should be switched to debug/verbose mode. In verbose mode,
  74. the logging severity and debuglevel specified in the configuration
  75. file are ignored and "debug" severity and the maximum debuglevel
  76. (99) are assumed. The flag is convenient, for temporarily
  77. switching the server into maximum verbosity, e.g. when
  78. debugging.</simpara>
  79. </listitem>
  80. <listitem>
  81. <simpara>
  82. <command>-v</command> - prints out Kea version and exits.
  83. </simpara>
  84. </listitem>
  85. <listitem>
  86. <simpara>
  87. <command>-V</command> - prints out Kea extended version with
  88. additional parameters and exits.
  89. </simpara>
  90. </listitem>
  91. </itemizedlist>
  92. <para>
  93. Upon start up the module will load its configuration and begin listening
  94. for NCRs based on that configuration.
  95. </para>
  96. </section> <!-- end start-stop -->
  97. <section id="d2-configuration">
  98. <title>Configuring the DHCP-DDNS Server</title>
  99. <para>
  100. Before starting <command>kea-dhcp-ddns</command> module for the
  101. first time, a configuration file needs to be created. The following default
  102. configuration is a template that can be customised to your requirements.
  103. <screen>
  104. <userinput>"DhcpDdns": {
  105. "ip_address": "127.0.0.1",
  106. "port": 53001,
  107. "dns_server_timeout": 100,
  108. "ncr_protocol": "UDP",
  109. "ncr_format": "JSON",
  110. "tsig_keys": [ ],
  111. "forward_ddns": {
  112. "ddns_domains": [ ]
  113. },
  114. "reverse_ddns": {
  115. "ddns_domains": [ ]
  116. }
  117. }</userinput>
  118. </screen>
  119. </para>
  120. <para>
  121. The configuration can be divided as follows, each of which is described
  122. in its own section:
  123. </para>
  124. <itemizedlist>
  125. <listitem>
  126. <simpara>
  127. <command>Global Server Parameters</command> -
  128. values which control connectivity and global server behavior
  129. </simpara>
  130. </listitem>
  131. <listitem>
  132. <simpara>
  133. <command>TSIG Key Info</command> -
  134. defines the TSIG keys used for secure traffic with DNS servers
  135. </simpara>
  136. </listitem>
  137. <listitem>
  138. <simpara>
  139. <command>Forward DDNS</command> -
  140. defines the catalog of Forward DDNS Domains
  141. </simpara>
  142. </listitem>
  143. <listitem>
  144. <simpara>
  145. <command>Reverse DDNS</command> -
  146. defines the catalog of Forward DDNS Domains
  147. </simpara>
  148. </listitem>
  149. </itemizedlist>
  150. <section id="d2-server-parameter-config">
  151. <title>Global Server Parameters</title>
  152. <itemizedlist>
  153. <listitem><simpara>
  154. <command>ip_address</command> - IP address on which D2
  155. listens for requests. The default is the local loopback interface at
  156. address 127.0.0.1. You may specify either an IPv4 or IPv6 address.
  157. </simpara></listitem>
  158. <listitem><simpara>
  159. <command>port</command> - Port on which D2 listens for requests. The default value
  160. is 53001.
  161. </simpara></listitem>
  162. <listitem><simpara>
  163. <command>dns_server_timeout</command> - The maximum amount
  164. of time in milliseconds, that D2 will wait for a response from a
  165. DNS server to a single DNS update message.
  166. </simpara></listitem>
  167. <listitem><simpara>
  168. <command>ncr_protocol</command> - Packet format to use when sending requests to D2.
  169. Currently only JSON format is supported. Other formats may be available
  170. in future releases.
  171. </simpara></listitem>
  172. <listitem><simpara>
  173. <command>ncr_format</command> - Socket protocol to use when sending requests to D2.
  174. Currently only UDP is supported. TCP may be available in an upcoming
  175. release.
  176. </simpara></listitem>
  177. </itemizedlist>
  178. <para>
  179. D2 must listen for change requests on a known address and port. By
  180. default it listens at 127.0.0.1 on port 53001. The following example
  181. illustrates how to change D2's global parameters so it will listen
  182. at 192.168.1.10 port 900:
  183. <screen>
  184. "DhcpDdns": {
  185. <userinput>"ip_address": "192.168.1.10",
  186. "port": 900,</userinput>
  187. ...
  188. }
  189. }</screen>
  190. </para>
  191. <warning>
  192. <simpara>
  193. It is possible for a malicious attacker to send bogus
  194. NameChangeRequests to the DHCP-DDNS server. Addresses
  195. other than the IPv4 or IPv6 loopback addresses (127.0.0.1
  196. or ::1) should only be used for testing purposes, but
  197. note that local users may still communicate with the
  198. DHCP-DDNS server. A future version of Kea will implement
  199. authentication to guard against such attacks.
  200. </simpara>
  201. <!-- see ticket #3514 -->
  202. </warning>
  203. <note>
  204. <simpara>
  205. If the ip_address and port are changed, it will be necessary to change the
  206. corresponding values in the DHCP servers' "dhcp-ddns" configuration section.
  207. </simpara>
  208. </note>
  209. </section> <!-- "d2-server-parameter-config" -->
  210. <section id="d2-tsig-key-list-config">
  211. <title>TSIG Key List</title>
  212. <para>
  213. A DDNS protocol exchange can be conducted with or without TSIG
  214. (defined in <ulink url="http://tools.ietf/org/html/rfc2845">RFC
  215. 2845</ulink>). This configuration section allows the administrator
  216. to define the set of TSIG keys that may be used in such
  217. exchanges.</para>
  218. <para>To use TSIG when updating entries in a DNS Domain,
  219. a key must be defined in the TSIG Key List and referenced by
  220. name in that domain's configuration entry. When D2 matches a
  221. change request to a domain, it checks whether the domain has
  222. a TSIG key associated with it. If so, D2 will use that key to
  223. sign DNS update messages sent to and verify responses received
  224. from the domain's DNS server(s). For each TSIG key required by
  225. the DNS servers that D2 will be working with there must be a
  226. corresponding TSIG key in the TSIG Key list.</para>
  227. <para>
  228. As one might gather from the name, the tsig_key section of the
  229. D2 configuration lists the TSIG keys. Each entry describes a
  230. TSIG key used by one or more DNS servers to authenticate requests
  231. and sign responses. Every entry in the list has three parameters:
  232. <itemizedlist>
  233. <listitem>
  234. <simpara>
  235. <command>name</command> -
  236. a unique text label used to identify this key within the
  237. list. This value is used to specify which key (if any) should be
  238. used when updating a specific domain. So long as it is unique its
  239. content is arbitrary, although for clarity and ease of maintenance
  240. it is recommended that it match the name used on the DNS server(s).
  241. It cannot be blank.
  242. </simpara>
  243. </listitem>
  244. <listitem>
  245. <simpara>
  246. <command>algorithm</command> -
  247. specifies which hashing algorithm should be used with this
  248. key. This value must specify the same algorithm used for the
  249. key on the DNS server(s). The supported algorithms are listed below:
  250. <itemizedlist>
  251. <listitem>
  252. <command>HMAC-MD5</command>
  253. </listitem>
  254. <listitem>
  255. <command>HMAC-SHA1</command>
  256. </listitem>
  257. <listitem>
  258. <command>HMAC-SHA224</command>
  259. </listitem>
  260. <listitem>
  261. <command>HMAC-SHA256</command>
  262. </listitem>
  263. <listitem>
  264. <command>HMAC-SHA384</command>
  265. </listitem>
  266. <listitem>
  267. <command>HMAC-SHA512</command>
  268. </listitem>
  269. </itemizedlist>
  270. This value is not case sensitive.
  271. </simpara>
  272. </listitem>
  273. <listitem>
  274. <simpara>
  275. <command>digest_bits</command> -
  276. is used to specify the minimum truncated length in bits.
  277. The default value 0 means truncation is forbidden, not 0
  278. values must be an integral number of octets, be greater
  279. than 80 and the half of the full length. Note in BIND9
  280. this parameter is appended after a dash to the algorithm
  281. name.
  282. </simpara>
  283. </listitem>
  284. <listitem>
  285. <simpara>
  286. <command>secret</command> -
  287. is used to specify the shared secret key code for this key. This value is
  288. case sensitive and must exactly match the value specified on the DNS server(s).
  289. It is a base64-encoded text value.
  290. </simpara>
  291. </listitem>
  292. </itemizedlist>
  293. </para>
  294. <para>
  295. As an example, suppose that a domain D2 will be updating is
  296. maintained by a BIND9 DNS server which requires dynamic updates
  297. to be secured with TSIG. Suppose further that the entry for
  298. the TSIG key in BIND9's named.conf file looks like this:
  299. <screen>
  300. :
  301. key "key.four.example.com." {
  302. algorithm hmac-sha224;
  303. secret "bZEG7Ow8OgAUPfLWV3aAUQ==";
  304. };
  305. :
  306. </screen>
  307. By default, the TSIG Key list is empty:
  308. <screen>
  309. "DhcpDdns": {
  310. <userinput>"tsig_keys": [ ]</userinput>,
  311. ...
  312. }
  313. </screen>
  314. We must extend the list with a new key:
  315. <screen>
  316. "DhcpDdns": {
  317. "tsig_keys": [
  318. <userinput> {
  319. "name": "key.four.example.com.",
  320. "algorithm": "HMAC-SHA224",
  321. "secret": "bZEG7Ow8OgAUPfLWV3aAUQ=="
  322. }</userinput>
  323. ],
  324. ...
  325. }
  326. </screen>
  327. </para>
  328. <para>These steps would be repeated for each TSIG key needed. Note that
  329. the same TSIG key can be used with more than one domain.</para>
  330. </section>
  331. <!-- "d2-tsig-key-list-config" -->
  332. <section id="d2-forward-ddns-config">
  333. <title>Forward DDNS</title>
  334. <para>
  335. The Forward DDNS section is used to configure D2's forward update
  336. behavior. Currently it contains a single parameter, the catalog of
  337. forward DDNS Domains, which is a list of structures.
  338. <screen>
  339. "DhcpDdns": {
  340. <userinput>"forward_ddns": {
  341. "ddns_domains": [ ]
  342. }</userinput>,
  343. ...
  344. }
  345. </screen>
  346. By default, this list is empty, which will cause the server to ignore
  347. the forward update portions of requests.
  348. </para>
  349. <section id="add-forward-ddns-domain">
  350. <title>Adding Forward DDNS Domains</title>
  351. <para>
  352. A forward DDNS Domain maps a forward DNS zone to a set of
  353. DNS servers which maintain the forward DNS data (i.e. name to
  354. address mapping) for that zone. You will need one forward DDNS
  355. Domain for each zone you wish to service. It may very well
  356. be that some or all of your zones are maintained by the same
  357. servers. You will still need one DDNS Domain per zone. Remember
  358. that matching a request to the appropriate server(s) is done
  359. by zone and a DDNS Domain only defines a single zone.
  360. </para>
  361. <para>
  362. This section describes how to add Forward DDNS Domains. Repeat these
  363. steps for each Forward DDNS Domain desired. Each Forward DDNS Domain
  364. has the following parameters:
  365. <itemizedlist>
  366. <listitem>
  367. <simpara>
  368. <command>name</command> -
  369. The fully qualified domain name (or zone) that this DDNS Domain
  370. can update. This is value used to compare against the request
  371. FQDN during forward matching. It must be unique within the
  372. catalog.
  373. </simpara>
  374. </listitem>
  375. <listitem>
  376. <simpara>
  377. <command>key_name</command> -
  378. If TSIG is used with this domain's servers, this
  379. value should be the name of the key from within the TSIG Key List
  380. to use. If the value is blank (the default), TSIG will not be
  381. used in DDNS conversations with this domain's servers.
  382. </simpara>
  383. </listitem>
  384. <listitem>
  385. <simpara>
  386. <command>dns_servers</command> -
  387. A list of one or more DNS servers which can conduct the server
  388. side of the DDNS protocol for this domain. The servers
  389. are used in a first to last preference. In other words, when D2
  390. begins to process a request for this domain it will pick the
  391. first server in this list and attempt to communicate with it.
  392. If that attempt fails, it will move to next one in the list and
  393. so on until the it achieves success or the list is exhausted.
  394. </simpara>
  395. </listitem>
  396. </itemizedlist>
  397. To create a new forward DDNS Domain, one must add a new domain
  398. element and set its parameters:
  399. <screen>
  400. "DhcpDdns": {
  401. "forward_ddns": {
  402. "ddns_domains": [
  403. <userinput>{
  404. "name": "other.example.com.",
  405. "key_name": "",
  406. "dns_servers": [
  407. ]
  408. }</userinput>
  409. ]
  410. }
  411. }
  412. </screen>
  413. It is permissible to add a domain without any servers. If that domain
  414. should be matched to a request, however, the request will fail. In
  415. order to make the domain useful though, we must add at least one DNS
  416. server to it.
  417. </para>
  418. <section id="add-forward-dns-servers">
  419. <title>Adding Forward DNS Servers</title>
  420. <para>
  421. This section describes how to add DNS servers to a Forward DDNS Domain.
  422. Repeat them for as many servers as desired for a each domain.
  423. </para>
  424. <para>
  425. Forward DNS Server entries represent actual DNS servers which
  426. support the server side of the DDNS protocol. Each Forward DNS Server
  427. has the following parameters:
  428. <itemizedlist>
  429. <listitem>
  430. <simpara>
  431. <command>hostname</command> -
  432. The resolvable host name of the DNS server. This value is not
  433. yet implemented.
  434. </simpara>
  435. </listitem>
  436. <listitem>
  437. <simpara>
  438. <command>ip_address</command> -
  439. The IP address at which the server listens for DDNS requests.
  440. This may be either an IPv4 or an IPv6 address.
  441. </simpara>
  442. </listitem>
  443. <listitem>
  444. <simpara>
  445. <command>port</command> -
  446. The port on which the server listens for DDNS requests. It
  447. defaults to the standard DNS service port of 53.
  448. </simpara>
  449. </listitem>
  450. </itemizedlist>
  451. To create a new forward DNS Server, one must add a new server
  452. element to the domain and fill in its parameters. If for
  453. example the service is running at "172.88.99.10", then set it as
  454. follows:
  455. <screen>
  456. "DhcpDdns": {
  457. "forward_ddns": {
  458. "ddns_domains": [
  459. {
  460. "name": "other.example.com.",
  461. "key_name": "",
  462. "dns_servers": [
  463. <userinput>{
  464. "hostname": "",
  465. "ip_address": "172.88.99.10",
  466. "port": 53
  467. }</userinput>
  468. ]
  469. }
  470. ]
  471. }
  472. }
  473. </screen>
  474. </para>
  475. <note><simpara>
  476. As stated earlier, "hostname" is not yet supported so, the parameter
  477. "ip_address" must be set to the address of the DNS server.
  478. </simpara></note>
  479. </section> <!-- "add-forward-dns-servers" -->
  480. </section> <!-- "add-forward-ddns-domains" -->
  481. </section> <!-- "d2-forward-ddns-config" -->
  482. <section id="d2-reverse-ddns-config">
  483. <title>Reverse DDNS</title>
  484. <para>
  485. The Reverse DDNS section is used to configure D2's reverse update
  486. behavior, and the concepts are the same as for the forward DDNS
  487. section. Currently it contains a single parameter, the catalog of
  488. reverse DDNS Domains, which is a list of structures.
  489. <screen>
  490. "DhcpDdns": {
  491. <userinput>"reverse_ddns": {
  492. "ddns_domains": [ ]
  493. }</userinput>
  494. ...
  495. }
  496. </screen>
  497. By default, this list is empty, which will cause the server to ignore
  498. the reverse update portions of requests.
  499. </para>
  500. <section id="add-reverse-ddns-domain">
  501. <title>Adding Reverse DDNS Domains</title>
  502. <para>
  503. A reverse DDNS Domain maps a reverse DNS zone to a set of DNS
  504. servers which maintain the reverse DNS data (address to name
  505. mapping) for that zone. You will need one reverse DDNS Domain
  506. for each zone you wish to service. It may very well be that
  507. some or all of your zones are maintained by the same servers;
  508. even then, you will still need one DDNS Domain entry for each
  509. zone. Remember that matching a request to the appropriate
  510. server(s) is done by zone and a DDNS Domain only defines a
  511. single zone.
  512. </para>
  513. <para>
  514. This section describes how to add Reverse DDNS Domains. Repeat these
  515. steps for each Reverse DDNS Domain desired. Each Reverse DDNS Domain
  516. has the following parameters:
  517. <itemizedlist>
  518. <listitem>
  519. <simpara>
  520. <command>name</command> -
  521. The fully qualified reverse zone that this DDNS Domain
  522. can update. This is the value used during reverse matching
  523. which will compare it with a reversed version of the request's
  524. lease address. The zone name should follow the appropriate
  525. standards: for example, to to support the IPv4 subnet 172.16.1,
  526. the name should be. "1.16.172.in-addr.arpa.". Similarly,
  527. to support an IPv6 subent of 2001:db8:1, the name should be
  528. "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa."
  529. Whatever the name, it must be unique within the catalog.
  530. </simpara>
  531. </listitem>
  532. <listitem>
  533. <simpara>
  534. <command>key_name</command> -
  535. If TSIG should be used with this domain's servers, then this
  536. value should be the name of that key from the TSIG Key List.
  537. If the value is blank (the default), TSIG will not be
  538. used in DDNS conversations with this domain's servers. Currently
  539. this value is not used as TSIG has not been implemented.
  540. </simpara>
  541. </listitem>
  542. <listitem>
  543. <simpara>
  544. <command>dns_servers</command> -
  545. a list of one or more DNS servers which can conduct the server
  546. side of the DDNS protocol for this domain. Currently the servers
  547. are used in a first to last preference. In other words, when D2
  548. begins to process a request for this domain it will pick the
  549. first server in this list and attempt to communicate with it.
  550. If that attempt fails, it will move to next one in the list and
  551. so on until the it achieves success or the list is exhausted.
  552. </simpara>
  553. </listitem>
  554. </itemizedlist>
  555. To create a new reverse DDNS Domain, one must add a new domain element
  556. and set its parameters. For example, to support subnet 2001:db8:1::,
  557. the following configuration could be used:
  558. <screen>
  559. "DhcpDdns": {
  560. "reverse_ddns": {
  561. "ddns_domains": [
  562. <userinput>{
  563. "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
  564. "key_name": "",
  565. "dns_servers": [
  566. ]
  567. }</userinput>
  568. ]
  569. }
  570. }
  571. </screen>
  572. It is permissible to add a domain without any servers. If that domain
  573. should be matched to a request, however, the request will fail. In
  574. order to make the domain useful though, we must add at least one DNS
  575. server to it.
  576. </para>
  577. <section id="add-reverse-dns-servers">
  578. <title>Adding Reverse DNS Servers</title>
  579. <para>
  580. This section describes how to add DNS servers to a Reverse DDNS Domain.
  581. Repeat them for as many servers as desired for each domain.
  582. </para>
  583. <para>
  584. Reverse DNS Server entries represents a actual DNS servers which
  585. support the server side of the DDNS protocol. Each Reverse DNS Server
  586. has the following parameters:
  587. <itemizedlist>
  588. <listitem>
  589. <simpara>
  590. <command>hostname</command> -
  591. The resolvable host name of the DNS server. This value is
  592. currently ignored.
  593. </simpara>
  594. </listitem>
  595. <listitem>
  596. <simpara>
  597. <command>ip_address</command> -
  598. The IP address at which the server listens for DDNS requests.
  599. </simpara>
  600. </listitem>
  601. <listitem>
  602. <simpara>
  603. <command>port</command> -
  604. The port on which the server listens for DDNS requests. It
  605. defaults to the standard DNS service port of 53.
  606. </simpara>
  607. </listitem>
  608. </itemizedlist>
  609. To create a new reverse DNS Server, one must first add a new server
  610. element to the domain and fill in its parameters. If for
  611. example the service is running at "172.88.99.10", then set it as
  612. follows:
  613. <screen>
  614. "DhcpDdns": {
  615. "reverse_ddns": {
  616. "ddns_domains": [
  617. {
  618. "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
  619. "key_name": "",
  620. "dns_servers": [
  621. <userinput>{
  622. "hostname": "",
  623. "ip_address": "172.88.99.10",
  624. "port": 53
  625. }</userinput>
  626. ]
  627. }
  628. ]
  629. }
  630. }
  631. </screen>
  632. </para>
  633. <note>
  634. <simpara>
  635. As stated earlier, "hostname" is not yet supported so, the parameter
  636. "ip_address" must be set to the address of the DNS server.
  637. </simpara>
  638. </note>
  639. </section> <!-- "add-reverse-dns-servers" -->
  640. </section> <!-- "add-reverse-ddns-domains" -->
  641. </section> <!-- "d2-reverse-ddns-config" -->
  642. <section id="d2-exmaple-config">
  643. <title>Example DHCP-DDNS Server Configuration</title>
  644. <para>
  645. This section provides an example DHCP-DDNS server configuration based
  646. on a small example network. Let's suppose our example network has
  647. three domains, each with their own subnet.
  648. <table>
  649. <title>Our example network</title>
  650. <tgroup cols='4' align='left'>
  651. <colspec colname='domain'/>
  652. <colspec colname='subnet'/>
  653. <colspec colname='fservers'/>
  654. <colspec colname='rservers'/>
  655. <thead>
  656. <row>
  657. <entry>Domain</entry>
  658. <entry>Subnet</entry>
  659. <entry>Forward DNS Servers</entry>
  660. <entry>Reverse DNS Servers</entry>
  661. </row>
  662. </thead>
  663. <tbody>
  664. <row>
  665. <entry>four.example.com</entry>
  666. <entry>192.0.2.0/24</entry>
  667. <entry>172.16.1.5, 172.16.2.5</entry>
  668. <entry>172.16.1.5, 172.16.2.5</entry>
  669. </row>
  670. <row>
  671. <entry>six.example.com</entry>
  672. <entry>2001:db8:1::/64</entry>
  673. <entry>3001:1::50</entry>
  674. <entry>3001:1::51</entry>
  675. </row>
  676. <row>
  677. <entry>example.com</entry>
  678. <entry>192.0.0.0/16</entry>
  679. <entry>172.16.2.5</entry>
  680. <entry>172.16.2.5</entry>
  681. </row>
  682. </tbody>
  683. </tgroup>
  684. </table>
  685. </para>
  686. <para>
  687. We need to construct three forward DDNS Domains:
  688. <table>
  689. <title>Forward DDNS Domains Needed</title>
  690. <tgroup cols='3' align='left'>
  691. <colspec colname='num'/>
  692. <colspec colname='name'/>
  693. <colspec colname='servers'/>
  694. <thead>
  695. <row>
  696. <entry>#</entry>
  697. <entry>DDNS Domain Name</entry>
  698. <entry>DNS Servers</entry>
  699. </row>
  700. </thead>
  701. <tbody>
  702. <row>
  703. <entry>1.</entry>
  704. <entry>four.example.com.</entry>
  705. <entry>172.16.1.5, 172.16.2.5</entry>
  706. </row>
  707. <row>
  708. <entry>2.</entry>
  709. <entry>six.example.com.</entry>
  710. <entry>3001:1::50</entry>
  711. </row>
  712. <row>
  713. <entry>3.</entry>
  714. <entry>example.com.</entry>
  715. <entry>172.16.2.5</entry>
  716. </row>
  717. </tbody>
  718. </tgroup>
  719. </table>
  720. As discussed earlier, FQDN to domain matching is based on the longest
  721. match. The FQDN, "myhost.four.example.com.", will match the first
  722. domain ("four.example.com") while "admin.example.com." will match the
  723. third domain ("example.com"). The
  724. FQDN, "other.example.net." will fail to match any domain and would
  725. be rejected.
  726. </para>
  727. <para>
  728. The following example configuration specified the Forward DDNS Domains.
  729. <screen><userinput>
  730. "DhcpDdns": {
  731. "forward_ddns": {
  732. "ddns_domains": [
  733. {
  734. "name": "four.example.com.",
  735. "key_name": "",
  736. "dns_servers": [
  737. { "ip_address": "172.16.1.5" },
  738. { "ip_address": "172.16.2.5" }
  739. ]
  740. },
  741. {
  742. "name": "six.example.com.",
  743. "key_name": "",
  744. "dns_servers": [
  745. { "ip_address": "2001:db8::1" }
  746. ]
  747. },
  748. {
  749. "name": "example.com.",
  750. "key_name": "",
  751. "dns_servers": [
  752. { "ip_address": "172.16.2.5" }
  753. ]
  754. },
  755. ]
  756. }
  757. }</userinput>
  758. </screen>
  759. </para>
  760. <para>
  761. Similarly, we need to construct the three reverse DDNS Domains:
  762. <table>
  763. <title>Reverse DDNS Domains Needed</title>
  764. <tgroup cols='3' align='left'>
  765. <colspec colname='num'/>
  766. <colspec colname='DDNS Domain name'/>
  767. <colspec colname='DDNS Domain DNS Servers'/>
  768. <thead>
  769. <row>
  770. <entry>#</entry>
  771. <entry>DDNS Domain Name</entry>
  772. <entry>DNS Servers</entry>
  773. </row>
  774. </thead>
  775. <tbody>
  776. <row>
  777. <entry>1.</entry>
  778. <entry>2.0.192.in-addr.arpa.</entry>
  779. <entry>172.16.1.5, 172.16.2.5</entry>
  780. </row>
  781. <row>
  782. <entry>2.</entry>
  783. <entry>1.0.0.0.8.d.b.0.1.0.0.2.ip6.arpa.</entry>
  784. <entry>3001:1::50</entry>
  785. </row>
  786. <row>
  787. <entry>3.</entry>
  788. <entry>0.182.in-addr.arpa.</entry>
  789. <entry>172.16.2.5</entry>
  790. </row>
  791. </tbody>
  792. </tgroup>
  793. </table>
  794. An address of "192.0.2.150" will match the first domain,
  795. "2001:db8:1::10" will match the second domain, and "192.0.50.77"
  796. the third domain.
  797. </para>
  798. <para>
  799. These Reverse DDNS Domains are specified as follows:
  800. <screen><userinput>
  801. "DhcpDdns": {
  802. "reverse_ddns": {
  803. "ddns_domains": [
  804. {
  805. "name": "2.0.192.in-addr.arpa.",
  806. "key_name": "",
  807. "dns_servers": [
  808. { "ip_address": "172.16.1.5" },
  809. { "ip_address": "172.16.2.5" }
  810. ]
  811. }
  812. {
  813. "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
  814. "key_name": "",
  815. "dns_servers": [
  816. { "ip_address": "2001:db8::1" }
  817. ]
  818. }
  819. {
  820. "name": "0.192.in-addr.arpa.",
  821. "key_name": "",
  822. "dns_servers": [
  823. { "ip_address": "172.16.2.5" }
  824. ]
  825. }
  826. ]
  827. }
  828. }</userinput>
  829. </screen>
  830. </para>
  831. </section> <!-- end of "d2-example" -->
  832. </section> <!-- end of section "d2-configuration" -->
  833. <section>
  834. <title>DHCP-DDNS Server Limitations</title>
  835. <para>The following are the current limitations of the DHCP-DDNS Server.</para>
  836. <itemizedlist>
  837. <listitem>
  838. <simpara>
  839. Requests received from the DHCP servers are placed in a
  840. queue until they are processed. Currently all queued requests
  841. are lost when the server shuts down.
  842. </simpara>
  843. </listitem>
  844. </itemizedlist>
  845. </section>
  846. </chapter> <!-- DHCP-DDNS Server -->