75
76
<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="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>
77
<arg choice='opt'>--interface<arg choice='plain'>IF</arg></arg>
78
<arg choice='opt'>--address<arg choice='plain'>ADDRESS</arg></arg>
79
<arg choice='opt'>--port<arg choice='plain'>PORT</arg></arg>
80
<arg choice='opt'>--priority<arg choice='plain'>PRIORITY</arg></arg>
81
<arg choice='opt'>--servicename<arg choice='plain'>NAME</arg></arg>
82
<arg choice='opt'>--configdir<arg choice='plain'>DIRECTORY</arg></arg>
83
<arg choice='opt'>--debug</arg>
86
<command>&COMMANDNAME;</command>
87
<arg choice='opt'>-i<arg choice='plain'>IF</arg></arg>
88
<arg choice='opt'>-a<arg choice='plain'>ADDRESS</arg></arg>
89
<arg choice='opt'>-p<arg choice='plain'>PORT</arg></arg>
90
<arg choice='opt'>--priority<arg choice='plain'>PRIORITY</arg></arg>
91
<arg choice='opt'>--servicename<arg choice='plain'>NAME</arg></arg>
92
<arg choice='opt'>--configdir<arg choice='plain'>DIRECTORY</arg></arg>
93
<arg choice='opt'>--debug</arg>
96
<command>&COMMANDNAME;</command>
97
<arg choice='plain'>--help</arg>
100
<command>&COMMANDNAME;</command>
101
<arg choice='plain'>--version</arg>
104
<command>&COMMANDNAME;</command>
105
<arg choice='plain'>--check</arg>
106
107
</refsynopsisdiv>
108
109
<refsect1 id="description">
111
112
<command>&COMMANDNAME;</command> is a server daemon which
112
113
handles incoming request for passwords for a pre-defined list of
113
114
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.
115
announce itself on the local network, and uses GnuTLS to
116
communicate securely with and to authenticate the clients.
117
Mandos uses IPv6 link-local addresses, since the clients are
118
assumed to not have any other addresses configured yet. Any
119
authenticated client is then given the pre-encrypted password
120
for that specific client.
125
125
<refsect1 id="purpose">
126
126
<title>PURPOSE</title>
129
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.
130
rebooting</emphasis> of any client host computer with an
131
<emphasis>encrypted root file system</emphasis>. The client
132
host computer should start a Mandos client in the initial RAM
133
disk environment, the Mandos client program communicates with
134
this server program to get an encrypted password, which is then
135
decrypted and used to unlock the encrypted root file system.
136
The client host computer can then continue its boot sequence
137
142
<refsect1 id="options">
138
143
<title>OPTIONS</title>
266
270
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
277
<refsect1 id="protocol">
284
278
<title>NETWORK PROTOCOL</title>
286
280
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.
281
"<literal>_mandos._tcp</literal>". The Mandos client connects
282
to the announced address and port, and sends a line of text
283
where the first whitespace-separated field is the protocol
284
version, which currently is "<literal>1</literal>". The client
285
and server then start a TLS protocol handshake with a slight
286
quirk: the Mandos server program acts as a TLS "client" while
287
the connecting Mandos client acts as a TLS "server". The Mandos
288
client must supply an OpenPGP certificate, and the fingerprint
289
of this certificate is used by the Mandos server to look up (in
290
a list read from a file at start time) which binary blob to give
291
the client. No other authentication or authorization is done by
302
<title>Mandos Protocol (Version 1)</title><tgroup cols="3"><thead>
294
<informaltable><tgroup cols="3"><thead>
304
296
<entry>Mandos Client</entry>
305
297
<entry>Direction</entry>
330
320
<entry><-<!-- ← --></entry>
331
<entry>Binary blob (client will assume OpenPGP data)</entry>
321
<entry>Binary blob</entry>
335
325
<entry><-<!-- ← --></entry>
336
326
<entry>Close</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>.
328
</tbody></tgroup></informaltable>
357
331
<refsect1 id="logging">
358
332
<title>LOGGING</title>
360
The server will send log messaged with various severity levels
361
to <filename>/dev/log</filename>. With the
334
The server will log a lot of information with various severity
336
<citerefentry><refentrytitle>syslog</refentrytitle>
337
<manvolnum>8</manvolnum></citerefentry>. With the
362
338
<option>--debug</option> option, it will log even more messages,
363
339
and also show them on the console.
375
351
<refsect1 id="file">
376
352
<title>FILES</title>
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.
356
<filename>/etc/mandos/mandos.conf</filename> See <citerefentry>
357
<refentrytitle>mandos.conf</refentrytitle>
358
<manvolnum>5</manvolnum></citerefentry>.
361
<filename>/etc/mandos/clients.conf</filename> See <citerefentry>
362
<refentrytitle>mandos-clients.conf</refentrytitle>
363
<manvolnum>5</manvolnum></citerefentry>.
366
<filename>/var/run/mandos/mandos.pid</filename>
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
424
372
<refsect1 id="bugs">
425
373
<title>BUGS</title>
427
This server might, on especially fatal errors, emit a Python
428
backtrace. This could be considered a feature.
432
378
<refsect1 id="examples">
433
379
<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
384
<refsect1 id="security">
471
385
<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
390
<refsect1 id="see_also">
510
391
<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.
392
<itemizedlist spacing="compact">
394
<citerefentry><refentrytitle>password-request</refentrytitle>
395
<manvolnum>8mandos</manvolnum></citerefentry>
399
<citerefentry><refentrytitle>plugin-runner</refentrytitle>
400
<manvolnum>8mandos</manvolnum></citerefentry>
404
<ulink url="http://www.zeroconf.org/">Zeroconf</ulink>
408
<ulink url="http://www.avahi.org/">Avahi</ulink>
413
url="http://www.gnu.org/software/gnutls/">GnuTLS</ulink>
417
<citation>RFC 4880: <citetitle>OpenPGP Message
418
Format</citetitle></citation>
422
<citation>RFC 5081: <citetitle>Using OpenPGP Keys for
423
Transport Layer Security</citetitle></citation>
427
<citation>RFC 4291: <citetitle>IP Version 6 Addressing
428
Architecture</citetitle>, section 2.5.6, Link-Local IPv6
429
Unicast Addresses</citation>