67
67
<refname><command>&COMMANDNAME;</command></refname>
69
Sends encrypted passwords to authenticated mandos clients
69
Sends encrypted passwords to authenticated Mandos clients
75
75
<command>&COMMANDNAME;</command>
76
<arg choice='opt'>--interface<arg choice='plain'>IF</arg></arg>
77
<arg choice='opt'>--address<arg choice='plain'>ADDRESS</arg></arg>
78
<arg choice='opt'>--port<arg choice='plain'>PORT</arg></arg>
79
<arg choice='opt'>--priority<arg choice='plain'>PRIORITY</arg></arg>
80
<arg choice='opt'>--servicename<arg choice='plain'>NAME</arg></arg>
81
<arg choice='opt'>--configdir<arg choice='plain'>DIRECTORY</arg></arg>
82
<arg choice='opt'>--debug</arg>
85
<command>&COMMANDNAME;</command>
86
<arg choice='plain'>--help</arg>
89
<command>&COMMANDNAME;</command>
90
<arg choice='plain'>--version</arg>
93
<command>&COMMANDNAME;</command>
94
<arg choice='plain'>--check</arg>
76
<arg choice="opt">--interface<arg choice="plain">IF</arg></arg>
77
<arg choice="opt">--address<arg choice="plain">ADDRESS</arg></arg>
78
<arg choice="opt">--port<arg choice="plain">PORT</arg></arg>
79
<arg choice="opt">--priority<arg choice="plain">PRIORITY</arg></arg>
80
<arg choice="opt">--servicename<arg choice="plain">NAME</arg></arg>
81
<arg choice="opt">--configdir<arg choice="plain">DIRECTORY</arg></arg>
82
<arg choice="opt">--debug</arg>
85
<command>&COMMANDNAME;</command>
86
<arg choice="opt">-i<arg choice="plain">IF</arg></arg>
87
<arg choice="opt">-a<arg choice="plain">ADDRESS</arg></arg>
88
<arg choice="opt">-p<arg choice="plain">PORT</arg></arg>
89
<arg choice="opt">--priority<arg choice="plain">PRIORITY</arg></arg>
90
<arg choice="opt">--servicename<arg choice="plain">NAME</arg></arg>
91
<arg choice="opt">--configdir<arg choice="plain">DIRECTORY</arg></arg>
92
<arg choice="opt">--debug</arg>
95
<command>&COMMANDNAME;</command>
96
<arg choice="plain">--help</arg>
99
<command>&COMMANDNAME;</command>
100
<arg choice="plain">--version</arg>
103
<command>&COMMANDNAME;</command>
104
<arg choice="plain">--check</arg>
98
108
<refsect1 id="description">
99
109
<title>DESCRIPTION</title>
101
<command>&COMMANDNAME;</command> is a server daemon that handels
102
incomming passwords request for passwords. Mandos use avahi to
103
announce the service, and through gnutls authenticates
104
clients. Any authenticated client is then given its encrypted
111
<command>&COMMANDNAME;</command> is a server daemon which
112
handles incoming request for passwords for a pre-defined list of
113
client host computers. The Mandos server uses Zeroconf to
114
announce itself on the local network, and uses TLS to
115
communicate securely with and to authenticate the clients. The
116
Mandos server uses IPv6 to allow Mandos clients to use IPv6
117
link-local addresses, since the clients will probably not have
118
any other addresses configured (see <xref linkend="overview"/>).
119
Any authenticated client is then given the stored pre-encrypted
120
password for that specific client.
125
<refsect1 id="purpose">
126
<title>PURPOSE</title>
129
The purpose of this is to enable <emphasis>remote and unattended
130
rebooting</emphasis> of client host computer with an
131
<emphasis>encrypted root file system</emphasis>. See <xref
132
linkend="overview"/> for details.
137
<refsect1 id="options">
138
<title>OPTIONS</title>
110
142
<term><literal>-h</literal>, <literal>--help</literal></term>
113
show a help message and exit
145
Show a help message and exit
120
152
IF</replaceable></literal></term>
155
Only announce the server and listen to requests on network
156
interface <replaceable>IF</replaceable>. Default is to
157
use all available interfaces.
129
163
<term><literal>-a</literal>, <literal>--address <replaceable>
130
164
ADDRESS</replaceable></literal></term>
133
Address to listen for requests on
167
If this option is used, the server will only listen to a
168
specific address. This must currently be an IPv6 address;
169
an IPv4 address can be specified using the
170
<quote><literal>::FFFF:192.0.2.3</literal></quote> syntax.
171
Also, if a link-local address is specified, an interface
172
should be set, since a link-local address is only valid on
173
a single interface. By default, the server will listen to
174
all available addresses.
139
180
<term><literal>-p</literal>, <literal>--port <replaceable>
140
181
PORT</replaceable></literal></term>
143
Port number to receive requests on
184
If this option is used, the server to bind to that
185
port. By default, the server will listen to an arbitrary
186
port given by the operating system.
149
192
<term><literal>--check</literal></term>
152
Run self-test on the server
195
Run the server’s self-tests. This includes any unit
158
202
<term><literal>--debug</literal></term>
205
If the server is run in debug mode, it will run in the
206
foreground and print a lot of debugging information. The
207
default is <emphasis>not</emphasis> to run in debug mode.
168
214
PRIORITY</replaceable></literal></term>
171
GnuTLS priority string. See <citerefentry>
172
<refentrytitle>gnutls_priority_init</refentrytitle>
173
<manvolnum>3</manvolnum></citerefentry>
217
GnuTLS priority string for the TLS handshake with the
218
clients. The default is
219
<quote><literal>SECURE256:!CTYPE-X.509:+CTYPE-OPENPGP</literal></quote>.
220
See <citerefentry><refentrytitle>gnutls_priority_init
221
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
222
for the syntax. <emphasis>Warning</emphasis>: changing
223
this may make the TLS handshake fail, making communication
224
with clients impossible.
179
230
<term><literal>--servicename <replaceable>NAME</replaceable>
180
231
</literal></term>
183
Zeroconf service name
234
Zeroconf service name. The default is
235
<quote><literal>Mandos</literal></quote>. You only need
236
to change this if you for some reason want to run more
237
than one server on the same <emphasis>host</emphasis>,
238
which would not normally be useful. If there are name
239
collisions on the same <emphasis>network</emphasis>, the
240
newer server will automatically rename itself to
241
<quote><literal>Mandos #2</literal></quote>, and so on;
242
therefore, this option is not needed in that case.
189
248
<term><literal>--configdir <replaceable>DIR</replaceable>
190
249
</literal></term>
193
Directory to search for configuration files
252
Directory to search for configuration files. Default is
253
<quote><literal>/etc/mandos</literal></quote>. See
254
<citerefentry><refentrytitle>mandos.conf</refentrytitle>
255
<manvolnum>5</manvolnum></citerefentry> and <citerefentry>
256
<refentrytitle>mandos-clients.conf</refentrytitle>
257
<manvolnum>5</manvolnum></citerefentry>.
199
263
<term><literal>--version</literal></term>
202
Prints the program version
266
Prints the program version and exit.
273
<refsect1 id="overview">
274
<title>OVERVIEW</title>
277
This program is the server part. It is a normal server program
278
and will run in a normal system environment, not in an initial
279
RAM disk environment.
283
<refsect1 id="protocol">
284
<title>NETWORK PROTOCOL</title>
286
The Mandos server announces itself as a Zeroconf service of type
287
<quote><literal>_mandos._tcp</literal></quote>. The Mandos
288
client connects to the announced address and port, and sends a
289
line of text where the first whitespace-separated field is the
290
protocol version, which currently is
291
<quote><literal>1</literal></quote>. The client and server then
292
start a TLS protocol handshake with a slight quirk: the Mandos
293
server program acts as a TLS <quote>client</quote> while the
294
connecting Mandos client acts as a TLS <quote>server</quote>.
295
The Mandos client must supply an OpenPGP certificate, and the
296
fingerprint of this certificate is used by the Mandos server to
297
look up (in a list read from <filename>clients.conf</filename>
298
at start time) which binary blob to give the client. No other
299
authentication or authorization is done by the server.
302
<title>Mandos Protocol (Version 1)</title><tgroup cols="3"><thead>
304
<entry>Mandos Client</entry>
305
<entry>Direction</entry>
306
<entry>Mandos Server</entry>
310
<entry>Connect</entry>
311
<entry>-><!-- → --></entry>
314
<entry><quote><literal>1\r\en</literal></quote></entry>
315
<entry>-><!-- → --></entry>
318
<entry>TLS handshake <emphasis>as TLS <quote>server</quote>
320
<entry><-><!-- ⟷ --></entry>
321
<entry>TLS handshake <emphasis>as TLS <quote>client</quote>
325
<entry>OpenPGP public key (part of TLS handshake)</entry>
326
<entry>-><!-- → --></entry>
330
<entry><-<!-- ← --></entry>
331
<entry>Binary blob (client will assume OpenPGP data)</entry>
335
<entry><-<!-- ← --></entry>
338
</tbody></tgroup></table>
341
<refsect1 id="checking">
342
<title>CHECKING</title>
344
The server will, by default, continually check that the clients
345
are still up. If a client has not been confirmed as being up
346
for some time, the client is assumed to be compromised and is no
347
longer eligible to receive the encrypted password. The timeout,
348
checker program, and interval between checks can be configured
349
both globally and per client; see <citerefentry>
350
<refentrytitle>mandos.conf</refentrytitle>
351
<manvolnum>5</manvolnum></citerefentry> and <citerefentry>
352
<refentrytitle>mandos-clients.conf</refentrytitle>
353
<manvolnum>5</manvolnum></citerefentry>.
357
<refsect1 id="logging">
358
<title>LOGGING</title>
360
The server will send log messaged with various severity levels
361
to <filename>/dev/log</filename>. With the
362
<option>--debug</option> option, it will log even more messages,
363
and also show them on the console.
367
<refsect1 id="exit_status">
368
<title>EXIT STATUS</title>
370
The server will exit with a non-zero exit status only when a
371
critical error is encountered.
378
Use the <option>--configdir</option> option to change where
379
<command>&COMMANDNAME;</command> looks for its configurations
380
files. The default file names are listed here.
384
<term><filename>/etc/mandos/mandos.conf</filename></term>
387
Server-global settings. See
388
<citerefentry><refentrytitle>mandos.conf</refentrytitle>
389
<manvolnum>5</manvolnum></citerefentry> for details.
394
<term><filename>/etc/mandos/clients.conf</filename></term>
397
List of clients and client-specific settings. See
398
<citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>
399
<manvolnum>5</manvolnum></citerefentry> for details.
404
<term><filename>/var/run/mandos/mandos.pid</filename></term>
407
The file containing the process id of
408
<command>&COMMANDNAME;</command>.
413
<term><filename>/dev/log</filename></term>
416
The Unix domain socket to where local syslog messages are
427
This server might, on especially fatal errors, emit a Python
428
backtrace. This could be considered a feature.
432
<refsect1 id="examples">
433
<title>EXAMPLES</title>
436
Normal invocation needs no options:
439
<userinput>mandos</userinput>
444
Run the server in debug mode, read configuration files from
445
the <filename>~/mandos</filename> directory, and use the
446
Zeroconf service name <quote>Test</quote> to not collide with
447
any other official Mandos server on this host:
451
<!-- do not wrap this line -->
452
<userinput>mandos --debug --configdir ~/mandos --servicename Test</userinput>
458
Run the server normally, but only listen to one interface and
459
only on the link-local address on that interface:
463
<!-- do not wrap this line -->
464
<userinput>mandos --interface eth7 --address fe80::aede:48ff:fe71:f6f2</userinput>
470
<refsect1 id="security">
471
<title>SECURITY</title>
473
<title>SERVER</title>
475
Running this &COMMANDNAME; server program should not in itself
476
present any security risk to the host computer running it.
477
The program does not need any special privileges to run, and
478
is designed to run as a non-root user.
482
<title>CLIENTS</title>
484
The server only gives out its stored data to clients which
485
does have the OpenPGP key of the stored fingerprint. This is
486
guaranteed by the fact that the client sends its OpenPGP
487
public key in the TLS handshake; this ensures it to be
488
genuine. The server computes the fingerprint of the key
489
itself and looks up the fingerprint in its list of
490
clients. The <filename>clients.conf</filename> file (see
491
<citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>
492
<manvolnum>5</manvolnum></citerefentry>)
493
<emphasis>must</emphasis> be made non-readable by anyone
494
except the user running the server.
497
As detailed in <xref linkend="checking"/>, the status of all
498
client computers will continually be checked and be assumed
499
compromised if they are gone for too long.
502
For more details on client-side security, see
503
<citerefentry><refentrytitle>password-request</refentrytitle>
504
<manvolnum>8mandos</manvolnum></citerefentry>.
509
<refsect1 id="see_also">
510
<title>SEE ALSO</title>
515
<refentrytitle>password-request</refentrytitle>
516
<manvolnum>8mandos</manvolnum>
521
This is the actual program which talks to this server.
522
Note that it is normally not invoked directly, and is only
523
run in the initial RAM disk environment, and not on a
524
fully started system.
530
<ulink url="http://www.zeroconf.org/">Zeroconf</ulink>
534
Zeroconf is the network protocol standard used by clients
535
for finding this Mandos server on the local network.
541
<ulink url="http://www.avahi.org/">Avahi</ulink>
545
Avahi is the library this server calls to implement
546
Zeroconf service announcements.
553
url="http://www.gnu.org/software/gnutls/">GnuTLS</ulink>
557
GnuTLS is the library this server uses to implement TLS for
558
communicating securely with the client, and at the same time
559
confidently get the client’s public OpenPGP key.
565
<citation>RFC 4291: <citetitle>IP Version 6 Addressing
566
Architecture</citetitle>, section 2.5.6, Link-Local IPv6
567
Unicast Addresses</citation>
571
The clients use IPv6 link-local addresses, which are
572
immediately usable since a link-local addresses is
573
automatically assigned to a network interfaces when it is
580
<citation>RFC 4346: <citetitle>The Transport Layer Security
581
(TLS) Protocol Version 1.1</citetitle></citation>
585
TLS 1.1 is the protocol implemented by GnuTLS.
591
<citation>RFC 4880: <citetitle>OpenPGP Message
592
Format</citetitle></citation>
596
The data sent to clients is binary encrypted OpenPGP data.
602
<citation>RFC 5081: <citetitle>Using OpenPGP Keys for
603
Transport Layer Security</citetitle></citation>
607
This is implemented by GnuTLS and used by this server so
608
that OpenPGP keys can be used.