BACKEND.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <title>
  7. GnuDIP Release 2.3 - Back End INSTALL File
  8. </title>
  9. <base target="_blank">
  10. </head>
  11. <body bgcolor=white>
  12. <table><tr valign=middle><td>
  13. <img align=middle src="gnudip/html/gnudip.jpg" alt="GnuDIP Logo" border=0 height=60 width=113>
  14. </td><td>
  15. <h1>GnuDIP Release 2.3 - Back End INSTALL File</h1>
  16. </table>
  17. <hr>
  18. <h3>Back End Scripts to Support Legacy BIND and tinydns</h3>
  19. <p>
  20. Releases of BIND prior to 8.2.3 and the
  21. <a href="http://tinydns.org/">tinydns</a>
  22. DNS server software do not support dynamic DNS in the fashion prescribed by
  23. the IETF RFC-s, and cannot be updated using the <code>nsupdate</code> command.
  24. <p>
  25. It is still possible to use early BIND releases and tinydns with GnuDIP.
  26. A few additional scripts are involved. These scripts use the configuration file
  27. <a href="gnudip/etc/backend.conf"><code>gnudip/etc/backend.conf</code></a>.
  28. <p>
  29. At a minimum, this configuration file must contain a line defining the command used to log
  30. messages. In the sample file this is:
  31. <blockquote><pre>
  32. # logger command for backend server
  33. logger = /usr/bin/logger -t gnudip-bkend
  34. </pre></blockquote>
  35. <p>
  36. Each back end has an associated:
  37. <ul>
  38. <li>
  39. UNIX FIFO file,
  40. <p><li>
  41. reload command and
  42. <p><li>
  43. minimum interval between reloads.
  44. </ul>
  45. You must create the FIFO (using <code>mkfifo</code>).
  46. The fifo may be created anywhere, but
  47. <a href="gnudip/run/"><code>/usr/local/gnudip/run/</code></a>
  48. would be an obvious place for it.
  49. Ensure that it is owned by and writable by user <code>nobody</code>
  50. (the "<code>nobody</code>" that GnuDIP runs as),
  51. with no access by any other user.
  52. <p>
  53. Three attributes must be provided in
  54. <a href="gnudip/etc/backend.conf"><code>backend.conf</code></a>
  55. for each back end. For example, the sample legacy BIND back end
  56. is defined by:
  57. <blockquote><pre>
  58. # name of fifo for dyn3.yourhost.com
  59. fifo.oldBIND.dyn3 = /usr/local/gnudip/run/backend.oldBIND.dyn3
  60. # command to actually reload dyn3.yourhost.com
  61. reload.oldBIND.dyn3 = /usr/local/gnudip/sbin/gdiprlbind.sh dyn3.yourhost.com
  62. # minimum seconds between reloads
  63. wait.oldBIND.dyn3 = 30
  64. </pre></blockquote>
  65. <p>
  66. The sample tinydns back end is defined by:
  67. <blockquote><pre>
  68. # name of fifo for tinydns
  69. fifo.tinydns = /usr/local/gnudip/run/tinydns
  70. # command to actually reload
  71. reload.tinydns = /usr/local/gnudip/sbin/gdiprltiny.sh
  72. # minimum seconds between reloads
  73. wait.tinydns = 5
  74. </pre></blockquote>
  75. <p>
  76. To use a back end by default for all GnuDIP domains, you replace the
  77. global <code>nsupdate</code> command with the back end client
  78. <a href="gnudip/sbin/gdipbkclt.pl"><code>gdipbkclt.pl</code></a>
  79. script in
  80. <a href="gnudip/etc/gnudip.conf">gnudip.conf</a>
  81. using a line like:
  82. <blockquote><pre>
  83. nsupdate = /usr/local/gnudip/sbin/gdipbkclt.pl mybackend
  84. </pre></blockquote>
  85. <p>
  86. To use a back end for a particular domain, you replace the
  87. <code>nsupdate</code> on a per domain basis using a line like:
  88. <blockquote><pre>
  89. nsupdate.mydomain = /usr/local/gnudip/sbin/gdipbkclt.pl mybackend
  90. </pre></blockquote>
  91. <p>
  92. The back end client script must be passed the back end name as an argument.
  93. The script will indicate that an update for the specified domain is needed by
  94. writing the back end name to the FIFO.
  95. <p>
  96. <u>For testing puposes you should use this client from the command line</u>:
  97. <blockquote><pre>
  98. # gdipbkclt.pl
  99. usage: gdipbkclt.pl [ -h | backend ]
  100. usage: Notify the backend server that that an
  101. usage: update to the backend has occured. The 'backend'
  102. usage: argument is used for look ups in backend.conf.
  103. usage: -h: Print this usage message.
  104. </pre></blockquote>
  105. <p>
  106. If the back end is for tinydns, you will need to specify an additional
  107. configuration parameter, either:
  108. <blockquote><pre>
  109. tinydns = YES
  110. </pre></blockquote>
  111. <p>
  112. globally or
  113. <blockquote><pre>
  114. tinydns.mydomain = YES
  115. </pre></blockquote>
  116. <p>
  117. for the per domain case. The Web Tool needs to know if a domain is being
  118. served by tinydns, in order to correctly validate MX values.
  119. <p>
  120. <u>You may have multiple domains for the same back end</u>.
  121. <p>
  122. You must also set up the back end server script
  123. <a href="gnudip/sbin/gdipbksrv.pl"><code>gdipbksrv.pl</code></a>
  124. to start at system start up using a command line like:
  125. <blockquote><pre>
  126. /usr/local/gnudip/sbin/gdipbksrv.pl mybackend
  127. </pre></blockquote>
  128. <p>
  129. Where you put this command line depends on the flavor of UNIX you have.
  130. For Slackware Linux it would go in <code>/etc/rc.d/rc.local</code>.
  131. You will have to determine where it goes on your system.
  132. It must also be passed the back end name as an argument.
  133. <p>
  134. <u>For testing puposes you may start this server from the command line</u>:
  135. <blockquote><pre>
  136. # gdipbksrv.pl
  137. usage: gdipbksrv.pl [ -h | [ -d ] backend ]
  138. usage: GnuDIP backend server.
  139. usage: Receive notififications that updates to the backend have occured,
  140. usage: and initiate reloads. The 'backend' argument is used for look
  141. usage: ups in backend.conf.
  142. usage: -h: Print this usage message.
  143. usage: -d: Debug - stay attached to current terminal.
  144. </pre></blockquote>
  145. <p>
  146. This server script will run your back end reload command when it
  147. receives a notification on the FIFO, unless enough time has not passed since
  148. the last time it was run. In that case it will run the reload script
  149. as soon as allowed. The script will be run as the <code>root</code>
  150. user.
  151. <p>
  152. You will in general need to <u>customize the back end reload script
  153. to your particular GnuDIP installation</u>.
  154. Two <b><u>sample</u></b> UNIX shell scripts are provided as a starting point:
  155. <ul>
  156. <li>
  157. <a href="gnudip/sbin/gdiprlbind.sh"><code>gdiprlbind.sh</code></a>
  158. <p>
  159. The script is for BIND. It takes a domain name as an argument.
  160. It scans the GnuDIP database for
  161. all users for that domain and generates input for a BIND 8 zone
  162. file.
  163. <p><li>
  164. <a href="gnudip/sbin/gdiprltiny.sh"><code>gdiprltiny.sh</code></a>
  165. <p>
  166. This script is for tinydns. It takes no arguments.
  167. It scans the GnuDIP database for all users (from all domains) and generates
  168. input for the <code>tinydns-data</code> utility.
  169. </ul>
  170. <p>
  171. These scripts are very simple because they each use a database scan script
  172. provided with GnuDIP:
  173. <ul>
  174. <li>
  175. <a href="gnudip/sbin/gdipbind.pl"><code>gdipbind.pl</code></a>
  176. for BIND 8:
  177. <blockquote><pre>
  178. # gdipbind.pl -h
  179. usage: gdipbind.pl [ -h | [ [-o | -a] outfile ] domain ]
  180. usage: Scans the database and generates BIND zone file input.
  181. usage: -h: Print this usage message.
  182. usage: -o: Specify file to write output to.
  183. usage: -a: Specify file to append output to.
  184. </pre></blockquote>
  185. <p><li>
  186. <a href="gnudip/sbin/gdiptinydns.pl"><code>gdiptinydns.pl</code></a>
  187. for tinydns:
  188. <blockquote><pre>
  189. # gdiptinydns.pl -h
  190. usage: gdiptinydns.pl [ -h | [ [-o | -a] outfile ] [domain] ]
  191. usage: Scans the database and generates tinydns input to create domain
  192. usage: file. Scans for all domains unless "domain" is specified.
  193. usage: -h: Print this usage message.
  194. usage: -o: Specify file to write output to.
  195. usage: -a: Specify file to append output to.
  196. </pre></blockquote>
  197. </ul>
  198. <p>
  199. Each sample reload script prefixes the output from the database scan script
  200. with additional input that is needed. It then initiates a DNS reload
  201. (i.e. on the local host).
  202. <p><hr>
  203. <p>
  204. You may require more sophisticated scripts for your environment.
  205. <p>
  206. The tinydns suite provides its own mechanism for detecting the changes to the
  207. domain file and performing an "incremental" zone transfer to secondary
  208. servers, using the <code>rsync</code> command. So if the primary tinydns server
  209. is on the GnuDIP machine, propogation of updates can be done in the normal way
  210. for tinydns.
  211. <p>
  212. Using BIND zone transfers to update secondary servers with early releases
  213. of BIND, while doing frequent zone reloads is problematic. The full zone
  214. transfers cause a severe demand on the network as the size of the zone grows.
  215. If you must use an early release of BIND, you may want to develop your
  216. mechanism for maintaining multiple servers.
  217. <p><hr>
  218. </body>
  219. </html>