Allow varying the port for new-style handshakes
[nbd.git] / man / nbd-server.5.in.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
3 <!-- Process this file with docbook-to-man to generate an nroff manual
4      page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
5      the manual page with: `docbook-to-man manpage.sgml | nroff -man |
6      less'.  A typical entry in a Makefile or Makefile.am is:
7
8 manpage.1: manpage.sgml
9         docbook-to-man $< > $@
10   -->
11
12   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
13   <!ENTITY dhfirstname "<firstname>Wouter</firstname>">
14   <!ENTITY dhsurname   "<surname>Verhelst</surname>">
15   <!-- Please adjust the date whenever revising the manpage. -->
16   <!ENTITY dhdate      "<date>$Date: 2006-10-18 15:01:57 +0200 (wo, 18 okt 2006) $</date>">
17   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
18        allowed: see man(7), man(1). -->
19   <!ENTITY dhsection   "<manvolnum>5</manvolnum>">
20   <!ENTITY dhemail     "<email>wouter@debian.org</email>">
21   <!ENTITY dhusername  "Wouter Verhelst">
22   <!ENTITY dhucpackage "<refentrytitle>NBD-SERVER</refentrytitle>">
23   <!ENTITY dhpackage   "$sysconfdir/nbd-server/config">
24
25   <!ENTITY debian      "<productname>Debian GNU/Linux</productname>">
26   <!ENTITY gnu         "<acronym>GNU</acronym>">
27 ]>
28
29 <refentry>
30   <refentryinfo>
31     <address>
32       &dhemail;
33     </address>
34     <author>
35       &dhfirstname;
36       &dhsurname;
37     </author>
38     <copyright>
39       <year>2006</year>
40       <holder>&dhusername;</holder>
41     </copyright>
42     &dhdate;
43   </refentryinfo>
44   <refmeta>
45     &dhucpackage;
46
47     &dhsection;
48   </refmeta>
49   <refnamediv>
50     <refname>&dhpackage;</refname>
51
52     <refpurpose>configuration file for nbd-server</refpurpose>
53   </refnamediv>
54   <refsynopsisdiv>
55     <cmdsynopsis>
56       <command>&dhpackage; </command>
57
58     </cmdsynopsis>
59   </refsynopsisdiv>
60   <refsect1>
61     <title>DESCRIPTION</title>
62
63     <para>This file allows to configure the nbd-server.</para>
64
65     <para>While
66       <filename>$sysconfdir/nbd-server/config</filename> is the default
67       configuration file, this can be varied with the <option>-C</option>
68       option to <command>nbd-server</command>(1).
69     </para>
70     <para>
71       The configuration file consists of section header lines, comment
72       lines, and option lines.
73     </para>
74     <para>
75       A section header is a unique name that
76       is enclosed in square brackets ("[" and "]"). A section header
77       denotes the beginning of a section; a section continues until
78       the next section or the end of the file, whichever is first. The
79       first section in the configuration file must be called
80       <option>generic</option>, and is used for global options that
81       apply to more than one export. This section must always be
82       present, even if it holds no options. Every other section
83       defines one export; the names of these sections are not
84       important, except that you should take care to make sure that
85       each section name is unique. The section name is used as the name
86       for the export in case the client connects with a name rather than
87       a port to specify an export, and must therefore be unique.
88     </para>
89     <para>
90       A comment line is a line that starts with optional whitespace,
91       followed by a pound sign ("#"), and continues until the end of
92       the line. Comments may <emphasis>not</emphasis> be used on
93       option lines or section header lines.
94     </para>
95     <para>
96       An option line is a line that starts with an option name,
97       followed by an equals sign ("="), followed by the option
98       value. An option can be of type string, of type integer, or of
99       type boolean. The value of a boolean option can be denoted with
100       either true or false (so not yes, no, on, off, 1, or 0). All
101       booleans default to false unless specified otherwise. No value
102       may be quoted; always enter it directly. For a string option,
103       leading whitespace is stripped (but trailing whitespace is not).
104     </para>
105
106   </refsect1>
107   <refsect1>
108     <title>OPTIONS FOR SECTION [generic]</title>
109
110     <!-- These are in alphabetical order, please keep it that way -->    
111     <variablelist>
112       <varlistentry>
113         <term><option>group</option></term>
114         <listitem>
115           <para>
116             Optional; string.
117           </para>
118           <para>
119             The name of the group this server must run as. If this
120             parameter is not specified, then nbd-server will not
121             attempt to change its GID (so the GID it runs as will be
122             the primary group of the user who starts nbd-server). If
123             it is specified, then nbd-server will change its GID after
124             opening ports, but before accepting connections or opening
125             files.
126           </para>
127         </listitem>
128       </varlistentry>
129       <varlistentry>
130         <term><option>listenaddr</option></term>
131         <listitem>
132           <para>
133             Optional; string
134           </para>
135           <para>If this option is set, it should contain the local IP
136           address on which we should listen to
137           <command>nbd-client</command>(8) connections. If it is not
138             set, <command>nbd-server</command> will listen to all
139           local IPv4 and IPv6 addresses. To limit to IPv6, specify the
140           address as "::". To limit to IPv4, specify as "0.0.0.0". It
141           is not possible to specify more than one IP address
142           here.</para>
143         </listitem>
144       </varlistentry>
145       <varlistentry>
146         <term><option>oldstyle</option></term>
147         <listitem>
148           <para>
149             Optional; boolean
150           </para>
151           <para>
152             If this option is set to true, nbd-server will export all
153             exports on a separate port with the old (pre-2.9.17)
154             handshake protocol. In that case, the 'port' option for
155             individual exports is mandatory.
156           </para>
157           <para>
158             If the option is set to false, the 'port' option for
159             individual exports is optional (and will be ignored if
160             specified). The server will only export devices on the
161             standard port.
162           </para>
163           <para>
164             For upgrades from pre-2.9.17 versions of nbd, it may be
165             appropriate to enable the oldstyle parameter until all
166             clients have been converted to using name-based exports.
167           </para>
168           <para>
169             Note that exports specified on the command line will
170             always use the old handshake protocol and will not allow
171             name-based exports.
172           </para>
173           <para>
174             Also note that even if this parameter is set to true, all
175             exports will also be made available using the new handshake
176             protocol; it is not possible to switch that off. The reason
177             for this is that the old style protocol will eventually be
178             deprecated, and this option is only available to allow for
179             smooth upgrades.
180           </para>
181         </listitem>
182       </varlistentry>
183       <varlistentry>
184         <term><option>port</option></term>
185         <listitem>
186           <para>
187             Optional; string
188           </para>
189           <para>
190             The port on which to listen for new-style nbd-client
191             connections. If not specified, the IANA-assigned port of
192             10809 is used.
193           </para>
194         </listitem>
195       </varlistentry>
196       <varlistentry>
197         <term><option>user</option></term>
198         <listitem>
199           <para>
200             Optional; string.
201           </para>
202           <para>
203             The name of the user this server must run as. If this
204             parameter is not specified, then nbd-server will not
205             attempt to change its UID (so the UID it runs as will be
206             the user who starts nbd-server). If it is specified, then
207             nbd-server will change its UID after opening ports, but
208             before accepting connections or opening files.
209           </para>
210         </listitem>
211       </varlistentry>
212     </variablelist>
213   </refsect1>
214   <refsect1>
215     <title>OPTIONS FOR EXPORT SECTIONS</title>
216
217     <!-- These are in alphabetical order, please keep it that way -->
218     <variablelist>
219       <varlistentry>
220         <term><option>authfile</option></term>
221         <listitem>
222           <para>
223             Optional; string; default
224             <filename>$sysconfdir/nbd-server/allow</filename>.
225           </para>
226           <para>
227             The name of the authorization file for this export. This
228             file should contain one line per IP-address, or per
229             network (which must be specified in CIDR-style
230             <option><replaceable>network</replaceable>/<replaceable>masklen</replaceable></option>)
231             and must not contain empty lines. If the file
232             does not exist, everyone is allowed to connect. If the
233             file exists but is empty, nobody is allowed to
234             connect. Otherwise, <command>nbd-server</command> will
235             only allow clients to connect whose IP-adres is listed in
236             this file.
237           </para>
238           <para>Corresponds to the <option>-l</option> option on the
239           command line</para>
240         </listitem>
241       </varlistentry>
242       <varlistentry>
243         <term><option>copyonwrite</option></term>
244         <listitem>
245           <para>
246             Optional; boolean.
247           </para>
248           <para>
249             Whether this is a copy-on-write export. If it is, then any
250             writes to this export will not be written to the master
251             file, but to a separate file which will be removed upon
252             disconnect. The result of using this option is that
253             nbd-server will be somewhat slower, and that any writes will
254             be lost upon disconnect.
255           </para>
256           <para>Corresponds to the <option>-c</option> option on the
257             command line</para>
258         </listitem>
259       </varlistentry>
260       <varlistentry>
261         <term><option>exportname</option></term>
262         <listitem>
263           <para>Required; string.</para>
264           <para>
265             The name of the file (or block device) that will be
266             exported. This must be a fully-qualified path and filename;
267             relative paths are not allowed.
268           </para>
269           <para>
270             Note that <command>nbd-server</command> will only try to
271             find and open the exported file when a client actually
272             connects; as a result, <command>nbd-server</command> must
273             be able to open and read this file
274             <emphasis>after</emphasis> changing to the user and group
275             that have been specified by use of the
276             <option>user</option> and <option>group</option> options;
277             also, <command>nbd-server</command> will only detect
278             errors in this option upon connection of a client.
279           </para>
280           <para>When specified on the command line, this should be the
281             second argument.
282           </para>
283         </listitem>
284       </varlistentry>
285       <varlistentry>
286         <term><option>filesize</option></term>
287         <listitem>
288           <para>Optional; integer; default autodetected.</para>
289           <para>
290             Disable autodetection of file or block device size, and
291             forcibly specify a size. Sizes must be specified in
292             bytes. If the <option>multifile</option> option is in
293             effect, this option specifies the size of the
294             <emphasis>entire</emphasis> export, not of individual
295             files.
296           </para>
297           <para>When specified on the command line, this should be the
298             third argument.
299           </para>
300         </listitem>
301       </varlistentry>
302       <varlistentry>
303         <term><option>flush</option></term>
304         <listitem>
305           <para>Optional; boolean.</para>
306           <para>When this option is enabled,
307             <command>nbd-server</command> will inform the client that it
308             supports and desires to be sent flush requests when the
309             elevator layer receives them. Receipt of a flush request
310             will cause an fdatasync() (or, if the sync option is set,
311             an fsync()) on the backend storage. This increases
312             reliability in the case of an unclean shutdown at
313             the expense of a degradation of performance. This option
314             will have no effect unless supported by the client.
315           </para>
316         </listitem>
317       </varlistentry>
318       <varlistentry>
319         <term><option>fua</option></term>
320         <listitem>
321           <para>Optional; boolean.</para>
322           <para>When this option is enabled,
323             <command>nbd-server</command> will inform the client that it
324             supports and desires to be sent fua (force unit access) commands
325             when the elevator layer receives them. Receipt of a force unit
326             access command will cause the specified command to be synced
327             to backend storage using sync_file_range() if supported, or
328             fdatasync() otherwise. This increases
329             reliability in the case of an unclean shutdown at
330             the expense of a degradation of performance. This option
331             will have no effect unless supported by the client.
332           </para>
333         </listitem>
334       </varlistentry>
335       <varlistentry>
336         <term>listenaddr</term>
337         <listitem>
338           <para>
339             Optional; string
340           </para>
341           <para>
342             If the 'oldstyle' global parameter is specified, works
343             similarly to the global listenaddr parameter, but for the
344             individual port of this particular export. If the 'oldstyle'
345             parameter is not set, this parameter is ignored.
346           </para>
347         </listitem>
348       </varlistentry>
349       <varlistentry>
350         <term><option>maxconnections</option></term>
351         <listitem>
352           <para>Optional; integer</para>
353           <para>
354             If specified, then it limits the number of opened connections for
355             this export.
356           </para>
357         </listitem>
358       </varlistentry>
359       <varlistentry>
360         <term><option>multifile</option></term>
361         <listitem>
362           <para>Optional; boolean.</para>
363           <para>
364             If this option is set to true, then
365             <command>nbd-server</command> will search for files of the
366             form
367             <replaceable>exportname</replaceable>.<replaceable>integer</replaceable>,
368             with <replaceable>exportname</replaceable> being the
369             filename that would otherwise have been used (after name
370             transformation for virtualization, if any, has been
371             performed) and <replaceable>integer</replaceable> an
372             integer number, starting with 0 and ending when no more
373             files can be found.
374           </para>
375           <para>
376             The size of the individual files will be autodetected,
377             <emphasis>even</emphasis> if the <option>filesize</option>
378             option has been specified.
379           </para>
380           <para>
381             Corresponds to the <option>-m</option> option on the
382             command line.
383           </para>
384         </listitem>
385       </varlistentry>
386       <varlistentry>
387         <term><option>port</option></term>
388         <listitem>
389           <para>Required if 'oldstyle' global parameter is set; integer.</para>
390           <para>
391             The port on which this export is to be served using the
392             old-style handshake protocol.
393           </para>
394           <para>
395             This parameter only makes sense when the 'oldstyle'
396             parameter is set to true in the 'generic' section. If that
397             parameter is not set, but this parameter is found in an
398             export section, then nbd-server will issue a warning upon
399             startup but should otherwise continue to function correctly.
400           </para>
401           <para>
402             It is not possible to combine multiple exports on the same
403             port using the old style handshake. Please use the new style
404             handshake for that purpose.
405           </para>
406           <para>
407             When specified on the command line, this should be the
408             first argument.
409           </para>
410         </listitem>
411       </varlistentry>
412       <varlistentry>
413         <term><option>postrun</option></term>
414         <listitem>
415           <para>Optional; string</para>
416           <para>
417             If specified, then it is assumed to be a command
418             that will be ran when a client has
419             disconnected. This can be useful to clean up
420             whatever <option>prerun</option> has set up, to log
421             something, or similar.
422           </para>
423           <para>
424             If the literal string '%s' is present in the
425             command, it will be replaced by the file name that
426             has just been closed.
427           </para>
428           <para>
429             In contrast to the <option>prerun</option> option,
430             the exit state of <option>postrun</option> is
431             <emphasis>ignored</emphasis>.
432           </para>
433         </listitem>
434       </varlistentry>
435       <varlistentry>
436         <term><option>prerun</option></term>
437         <listitem>
438           <para>Optional; string</para>
439           <para>
440             If specified, then this command will be ran after a
441             client has connected to the server (and has been
442             accepted), but before the server starts serving. If
443             the command contains the literal string '%s', then
444             this string will be replaced by the filename of the
445             file which nbd-server wants to export.
446           </para>
447           <para>
448             This is useful to create export files on the fly, or
449             to verify that a file can be used for export, to
450             write something to a log file, or similar.
451           </para>
452           <para>
453             If the command runs with a non-zero exit status,
454             then nbd-server will assume the export will fail,
455             and refuse to serve it.
456           </para>
457         </listitem>
458       </varlistentry>
459       <varlistentry>
460         <term><option>readonly</option></term>
461         <listitem>
462           <para>Optional; boolean.</para>
463           <para>
464             Disallow writes to the device. If this option is
465             specified, <command>nbd-server</command> will issue an
466             error to any client that tries to write to the device.
467           </para>
468           <para>
469             Use of this option in conjunction with
470             <option>copyonwrite</option> is possible, but silly.
471           </para>
472           <para>Corresponds to the <option>-r</option> option on the
473           command line.</para>
474         </listitem>
475       </varlistentry>
476       <varlistentry>
477         <term><option>rotational</option></term>
478         <listitem>
479           <para>Optional; boolean.</para>
480           <para>When this option is enabled,
481             <command>nbd-server</command> will inform the client that 
482             it would prefer it to send requests in elevator (i.e., optimized) order, perhaps
483             because it has a backing store and no local elevator. By
484             default, the client uses QUEUE_FLAG_NONROT, which effectively
485             restricts the function of the elevator to block merges. By
486             specifying this flag on the server, the client will not use
487             QUEUE_FLAG_NONROT, meaning the client elevator will perform
488             normal elevator ordering of I/O requests. Note that even when
489             the backing store is on rotating media, it is not normally
490             necessary to specify this flag, as the server's elevator
491             algorithm will be used. This flag is only required where
492             the server will not be using an elevator algorithm or where
493             the elevator algorithm is effectively neutered (e.g. with
494             the sync option set). This option will have no effect unless
495             supported by the client.
496           </para>
497         </listitem>
498       </varlistentry>
499       <varlistentry>
500         <term><option>sdp</option></term>
501         <listitem>
502           <para>Optional; boolean.</para>
503           <para>
504             When this option is enabled, <command>nbd-server</command>
505             will use the Socket Direct Protocol (SDP) to serve the
506             export, rather than just IP. This is faster, but requires
507             special hardware (usually something like InfiniBand) and
508             support in the kernel.
509           </para>
510           <para>
511             Additionally, support for this option must be enabled at
512             compile time, using the <option>--enable-sdp</option> option
513             to the <command>configure</command> script. If this option
514             is found in a configuration file and
515             <command>nbd-server</command> does not have support for SDP,
516             then <command>nbd-server</command> will exit with an error
517             message.
518           </para>
519         </listitem>
520       </varlistentry>
521       <varlistentry>
522         <term><option>sparse_cow</option></term>
523         <listitem>
524           <para>Optional; boolean.</para>
525           <para>
526             When this option is enabled, <command>nbd-server</command>
527             will use sparse files to implement the copy-on-write
528             option; such files take up less space then they appear to,
529             which allows <command>nbd-server</command> to handle the
530             file as if it was just as large as the block device it's
531             for.
532           </para>
533           <para>
534             If this option is disabled, <command>nbd-server</command>
535             will map every newly written block to the end of the
536             copy-on-write file, which means that
537             <command>nbd-server</command> will have to lseek(2) to the
538             right position after every 4096-byte block.
539           </para>
540           <para>
541             Using this option may be faster when much is being written
542             during a connection.
543           </para>
544         </listitem>
545       </varlistentry>
546       <varlistentry>
547         <term><option>sync</option></term>
548         <listitem>
549           <para>Optional; boolean.</para>
550           <para>When this option is enabled,
551             <command>nbd-server</command> will call an fsync() after every
552             write to the backend storage. Calling fsync() increases
553             reliability in case of an unclean shutdown of nbd-server; but,
554             depending on the file system used on the nbd-server side, may
555             degrade performance. The use of this option isn't always
556             necessary; e.g., on ext3 filesystems, it is recommended that
557             it is <emphasis>not</emphasis> enabled, since it seriously
558             reduces performance on ext3 filesystems while not
559             importantly impacting reliability.
560           </para>
561         </listitem>
562       </varlistentry>
563       <varlistentry>
564         <term><option>timeout</option></term>
565         <listitem>
566           <para>Optional; integer; default 0</para>
567           <para>
568             How many seconds a connection may be idle for this
569             export. When a connection is idle for a longer time,
570             <command>nbd-server</command> will forcibly disconnect the
571             connection. If you specify 0 (the default), then a
572             connection may be idle forever.
573           </para>
574           <para>
575             Corresponds to the <option>-a</option> option on the
576             command line
577           </para>
578         </listitem>
579       </varlistentry>
580       <varlistentry>
581         <term><option>transactionlog</option></term>
582         <listitem>
583           <para>Optional; string</para>
584           <para>
585             If specified, then this pathname is used to generate a transaction
586             log. A transaction log is a binary file consisting of the requests
587             sent to and the replies received by the server, but excluding any
588             data (so, for a write command, it records the offset and length
589             of the write but not the data written). It is therefore relatively
590             safe to distribute to a third party. Note that the transaction log
591             does not include the negotiation sequence. Transaction logs are
592             mainly useful for debugging. The program
593             <emphasis>nbd-tester-client</emphasis> distributed with the source
594             to this program can reply a transaction log against a server and
595             perform a data integrity test. Note that the transaction log is
596             written to for every client opened. If it is necessary to maintain
597             separate transaction logs for each client, the
598             <emphasis>prerun</emphasis> script should rename the transaction log
599             (which will just have been opened in order to avoid transaction logs
600             overwriting eachother. This action should be race-free.
601           </para>
602         </listitem>
603       </varlistentry>
604       <varlistentry>
605         <term><option>virtstyle</option></term>
606         <listitem>
607           <para>Optional; string; default "ipliteral"</para>
608           <para>
609             Defines the style of virtualization. Virtualization allows
610             one to create one export that will serve a different file
611             depending on the IP address that is connecting. When
612             virtualization is active, the
613             <replaceable>exportname</replaceable> parameter needs to
614             contain the string '%s'; this will then be replaced by the
615             IP address of the client connecting, in accordance with the
616             option selected here. The result of this transformation is
617             then used as the filename to be opened.
618           </para>
619           <para>
620             There are four types of virtualization that
621             <command>nbd-server</command> supports:
622           </para>
623           <variablelist>
624             <varlistentry>
625               <term><option>none</option></term>
626               <listitem>
627                 <para>
628                   No virtualization. Will attempt to open the filename
629                   as it was written, even if it contains '%s' in the
630                   name.
631                 </para>
632               </listitem>
633             </varlistentry>
634             <varlistentry>
635               <term><option>ipliteral</option></term>
636               <listitem>
637                 <para>
638                   The %s is replaced by the IP address of the connecting
639                   host is used as-is.  For IPv4, this is done in
640                   dotted-quad notation; for IPv6, in hexadecimal form
641                   with leading zeros omitted.
642                 </para>
643                 <para>
644                   As an example, if a client connects from 192.168.1.100
645                   and <option>exportname</option> is specified as
646                   <filename>/export/%s</filename>, then nbd-server will
647                   attempt to serve
648                   <filename>/export/192.168.1.100</filename>. For IPv6,
649                   with a client connecting from 2001:6f8:32f::39, the
650                   filename would be
651                   <filename>/export/2001:6f8:32f:0:0:0:0:39</filename>
652                 </para>
653               </listitem>
654             </varlistentry>
655             <varlistentry>
656               <term><option>iphash</option></term>
657               <listitem>
658                 <para>
659                   Same as above, except that
660                   <command>nbd-server</command> will replace the dots
661                   in the IP address by forward slashes ('/'); in the
662                   same example, <command>nbd-server</command> would
663                   open <filename>/export/192/168/1/100</filename>
664                   instead.
665                 </para>
666                 <para>
667                   Since there are no dots in most IPv6 addresses, the
668                   effect of using this option when IPv6 is in use is
669                   indistinguishable from the ipliteral option. It was
670                   thought that having to create an eight-deep directory
671                   structure would not be as useful.
672                 </para>
673               </listitem>
674             </varlistentry>
675             <varlistentry>
676               <term><option>cidrhash</option></term>
677               <listitem>
678                 <para>
679                   This option requires one to add a space and a number
680                   after it. <command>nbd-server</command> will use the
681                   number as a network mask in CIDR style, and use that
682                   as a hash cutoff point. In the above example, if
683                   <option>virtstyle</option> has been specified as
684                   <constant>cidrhash 16</constant>, then
685                   <command>nbd-server</command> will try to open
686                   <filename>/export/192.168.0.0/192.168.1.100</filename>;
687                   if <option>virtstyle</option> were specified as
688                   <constant>cidrhash 26</constant>, then
689                   <command>nbd-server</command> will try to open
690                   <filename>/export/192.168.1.64/192.168.1.100</filename>.
691                 </para>
692                 <para>For IPv6, in the above example, with
693                 <constant>cidrhash 42</constant>, the filename would
694                 be
695                 <filename>/export/2001:32f:6c0:0:0:0:0:0/2001:32f:6f8:0:0:0:0:39</filename>.</para>
696               </listitem>
697             </varlistentry>
698           </variablelist>
699         </listitem>
700       </varlistentry>
701     </variablelist>
702     
703   </refsect1>
704   <refsect1>
705     <title>SEE ALSO</title>
706
707     <para>nbd-server (1), nbd-client (8), nbd-trdump (8)</para>
708       
709
710   </refsect1>
711   <refsect1>
712     <title>AUTHOR</title>
713     <para>The NBD kernel module and the NBD tools were originally
714       written by Pavel Machek (pavel@ucw.cz)</para>
715
716     <para>The Linux kernel module is now maintained by Paul Clements
717       (Paul.Clements@steeleye.com), while the userland tools are
718       maintained by &dhusername; (&dhemail;)</para>
719
720     <para>On The Hurd there is a regular translator available to perform the
721       client side of the protocol, and the use of
722       <command>nbd-client</command> is not required. Please see the
723       relevant documentation for more information.</para>
724
725     <para>This manual page was written by &dhusername; (&dhemail;) for
726       the &debian; system (but may be used by others).  Permission is
727       granted to copy, distribute and/or modify this document under
728       the terms of the <acronym>GNU</acronym> General Public License,
729       version 2, as published by the Free Software Foundation.</para>
730
731   </refsect1>
732   <refsect1>
733     <title>EXAMPLES</title>
734     <para>A simple <command>nbd-server</command> configuration file
735       would look like this:</para>
736     <programlisting>
737       [generic]
738       [export]
739           exportname = /export/blkdev
740           port = 12345
741     </programlisting>
742     <para>For increased security, one might want to create an
743       authorization file, and set the UID and GID to run as:</para>
744     <programlisting>
745       [generic]
746           user = nbd
747           group = nbd
748       [export]
749           exportname = /export/blkdev
750           port = 12345
751           authfile = $sysconfdir/nbd-server/allow
752     </programlisting>
753     <para>With $sysconfdir/nbd-server/allow containing the following:</para>
754     <programlisting>
755       127.0.0.1
756       192.168.0.0/8
757       192.168.1.1
758     </programlisting>
759   </refsect1>
760 </refentry>
761
762 <!-- Keep this comment at the end of the file
763 Local variables:
764 mode: sgml
765 sgml-omittag:t
766 sgml-shorttag:t
767 sgml-minimize-attributes:nil
768 sgml-always-quote-attributes:t
769 sgml-indent-step:2
770 sgml-indent-data:t
771 sgml-parent-document:nil
772 sgml-default-dtd-file:nil
773 sgml-exposed-tags:nil
774 sgml-local-catalogs:nil
775 sgml-local-ecat-files:nil
776 End:
777 -->