From 9b5ebcab6d4a971fc9332a3c5c1cb9733f3507a5 Mon Sep 17 00:00:00 2001 From: yoe Date: Wed, 25 Oct 2006 12:41:54 +0000 Subject: [PATCH] r209: Sync documentation with what the code turned out to be, and add a few simple examples --- nbd-server.5.sgml | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/nbd-server.5.sgml b/nbd-server.5.sgml index 52378f3..d44abd0 100644 --- a/nbd-server.5.sgml +++ b/nbd-server.5.sgml @@ -64,7 +64,7 @@ manpage.1: manpage.sgml nbd-server. The default configuration file is - @SCD@/nbd-server/config, but this + @sysconfdir@/nbd-server/config, but this can be varied with the option to nbd-server(1). @@ -154,12 +154,14 @@ manpage.1: manpage.sgml Optional; string; default - @SCD@/nbd-server/allow. + @sysconfdir@/nbd-server/allow. The name of the authorization file for this export. This - file should contain one line per IP-address, and must not - contain wildcards of any kind or empty lines. If the file + file should contain one line per IP-address, or per + network (which must be specified in CIDR-style + ) + and must not contain empty lines. If the file does not exist, everyone is allowed to connect. If the file exists but is empty, nobody is allowed to connect. Otherwise, nbd-server will @@ -457,6 +459,34 @@ manpage.1: manpage.sgml version 2, as published by the Free Software Foundation. + + EXAMPLES + A simple nbd-server configuration file + would look like this: + + [generic] + [export] + exportname = /export/blkdev + port = 12345 + + For increased security, one might want to create an + authorization file, and set the UID and GID to run as: + + [generic] + user = nbd + group = nbd + [export] + exportname = /export/blkdev + port = 12345 + authfile = /etc/nbd-server/allow + + With /etc/nbd-server/allow containing the following: + + 127.0.0.1 + 192.168.0.0/8 + 192.168.1.1 + +