49
67
<refname><command>&COMMANDNAME;</command></refname>
51
Gives encrypted passwords to authenticated Mandos clients
69
Sends encrypted passwords to authenticated mandos clients
57
75
<command>&COMMANDNAME;</command>
59
<arg choice="plain"><option>--interface
60
<replaceable>NAME</replaceable></option></arg>
61
<arg choice="plain"><option>-i
62
<replaceable>NAME</replaceable></option></arg>
66
<arg choice="plain"><option>--address
67
<replaceable>ADDRESS</replaceable></option></arg>
68
<arg choice="plain"><option>-a
69
<replaceable>ADDRESS</replaceable></option></arg>
73
<arg choice="plain"><option>--port
74
<replaceable>PORT</replaceable></option></arg>
75
<arg choice="plain"><option>-p
76
<replaceable>PORT</replaceable></option></arg>
79
<arg><option>--priority
80
<replaceable>PRIORITY</replaceable></option></arg>
82
<arg><option>--servicename
83
<replaceable>NAME</replaceable></option></arg>
85
<arg><option>--configdir
86
<replaceable>DIRECTORY</replaceable></option></arg>
88
<arg><option>--debug</option></arg>
90
<arg><option>--no-dbus</option></arg>
92
<arg><option>--no-ipv6</option></arg>
95
<command>&COMMANDNAME;</command>
97
<arg choice="plain"><option>--help</option></arg>
98
<arg choice="plain"><option>-h</option></arg>
102
<command>&COMMANDNAME;</command>
103
<arg choice="plain"><option>--version</option></arg>
106
<command>&COMMANDNAME;</command>
107
<arg choice="plain"><option>--check</option></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='plain'>--help</arg>
89
<command>&COMMANDNAME;</command>
90
<arg choice='plain'>--check</arg>
93
<command>&COMMANDNAME;</command>
94
<arg choice='plain'>--version</arg>
111
98
<refsect1 id="description">
112
99
<title>DESCRIPTION</title>
114
<command>&COMMANDNAME;</command> is a server daemon which
115
handles incoming request for passwords for a pre-defined list of
116
client host computers. The Mandos server uses Zeroconf to
117
announce itself on the local network, and uses TLS to
118
communicate securely with and to authenticate the clients. The
119
Mandos server uses IPv6 to allow Mandos clients to use IPv6
120
link-local addresses, since the clients will probably not have
121
any other addresses configured (see <xref linkend="overview"/>).
122
Any authenticated client is then given the stored pre-encrypted
123
password for that specific client.
127
<refsect1 id="purpose">
128
<title>PURPOSE</title>
130
The purpose of this is to enable <emphasis>remote and unattended
131
rebooting</emphasis> of client host computer with an
132
<emphasis>encrypted root file system</emphasis>. See <xref
133
linkend="overview"/> for details.
137
<refsect1 id="options">
138
<title>OPTIONS</title>
141
<term><option>--help</option></term>
142
<term><option>-h</option></term>
145
Show a help message and exit
151
<term><option>--interface</option>
152
<replaceable>NAME</replaceable></term>
153
<term><option>-i</option>
154
<replaceable>NAME</replaceable></term>
156
<xi:include href="mandos-options.xml" xpointer="interface"/>
161
<term><option>--address
162
<replaceable>ADDRESS</replaceable></option></term>
164
<replaceable>ADDRESS</replaceable></option></term>
166
<xi:include href="mandos-options.xml" xpointer="address"/>
172
<replaceable>PORT</replaceable></option></term>
174
<replaceable>PORT</replaceable></option></term>
176
<xi:include href="mandos-options.xml" xpointer="port"/>
181
<term><option>--check</option></term>
184
Run the server’s self-tests. This includes any unit
191
<term><option>--debug</option></term>
193
<xi:include href="mandos-options.xml" xpointer="debug"/>
198
<term><option>--priority <replaceable>
199
PRIORITY</replaceable></option></term>
201
<xi:include href="mandos-options.xml" xpointer="priority"/>
206
<term><option>--servicename
207
<replaceable>NAME</replaceable></option></term>
209
<xi:include href="mandos-options.xml"
210
xpointer="servicename"/>
215
<term><option>--configdir
216
<replaceable>DIRECTORY</replaceable></option></term>
219
Directory to search for configuration files. Default is
220
<quote><literal>/etc/mandos</literal></quote>. See
221
<citerefentry><refentrytitle>mandos.conf</refentrytitle>
222
<manvolnum>5</manvolnum></citerefentry> and <citerefentry>
223
<refentrytitle>mandos-clients.conf</refentrytitle>
224
<manvolnum>5</manvolnum></citerefentry>.
230
<term><option>--version</option></term>
233
Prints the program version and exit.
239
<term><option>--no-dbus</option></term>
241
<xi:include href="mandos-options.xml" xpointer="dbus"/>
243
See also <xref linkend="dbus_interface"/>.
249
<term><option>--no-ipv6</option></term>
251
<xi:include href="mandos-options.xml" xpointer="ipv6"/>
257
<refsect1 id="overview">
258
<title>OVERVIEW</title>
259
<xi:include href="overview.xml"/>
261
This program is the server part. It is a normal server program
262
and will run in a normal system environment, not in an initial
263
<acronym>RAM</acronym> disk environment.
267
<refsect1 id="protocol">
268
<title>NETWORK PROTOCOL</title>
270
The Mandos server announces itself as a Zeroconf service of type
271
<quote><literal>_mandos._tcp</literal></quote>. The Mandos
272
client connects to the announced address and port, and sends a
273
line of text where the first whitespace-separated field is the
274
protocol version, which currently is
275
<quote><literal>1</literal></quote>. The client and server then
276
start a TLS protocol handshake with a slight quirk: the Mandos
277
server program acts as a TLS <quote>client</quote> while the
278
connecting Mandos client acts as a TLS <quote>server</quote>.
279
The Mandos client must supply an OpenPGP certificate, and the
280
fingerprint of this certificate is used by the Mandos server to
281
look up (in a list read from <filename>clients.conf</filename>
282
at start time) which binary blob to give the client. No other
283
authentication or authorization is done by the server.
286
<title>Mandos Protocol (Version 1)</title><tgroup cols="3"><thead>
288
<entry>Mandos Client</entry>
289
<entry>Direction</entry>
290
<entry>Mandos Server</entry>
294
<entry>Connect</entry>
295
<entry>-><!-- → --></entry>
298
<entry><quote><literal>1\r\n</literal></quote></entry>
299
<entry>-><!-- → --></entry>
302
<entry>TLS handshake <emphasis>as TLS <quote>server</quote>
304
<entry><-><!-- ⟷ --></entry>
305
<entry>TLS handshake <emphasis>as TLS <quote>client</quote>
309
<entry>OpenPGP public key (part of TLS handshake)</entry>
310
<entry>-><!-- → --></entry>
314
<entry><-<!-- ← --></entry>
315
<entry>Binary blob (client will assume OpenPGP data)</entry>
319
<entry><-<!-- ← --></entry>
322
</tbody></tgroup></table>
325
<refsect1 id="checking">
326
<title>CHECKING</title>
328
The server will, by default, continually check that the clients
329
are still up. If a client has not been confirmed as being up
330
for some time, the client is assumed to be compromised and is no
331
longer eligible to receive the encrypted password. (Manual
332
intervention is required to re-enable a client.) The timeout,
333
checker program, and interval between checks can be configured
334
both globally and per client; see <citerefentry>
335
<refentrytitle>mandos-clients.conf</refentrytitle>
336
<manvolnum>5</manvolnum></citerefentry>. A client successfully
337
receiving its password will also be treated as a successful
342
<refsect1 id="approval">
343
<title>APPROVAL</title>
345
The server can be configured to require manual approval for a
346
client before it is sent its secret. The delay to wait for such
347
approval and the default action (approve or deny) can be
348
configured both globally and per client; see <citerefentry>
349
<refentrytitle>mandos-clients.conf</refentrytitle>
350
<manvolnum>5</manvolnum></citerefentry>. By default all clients
351
will be approved immediately without delay.
354
This can be used to deny a client its secret if not manually
355
approved within a specified time. It can also be used to make
356
the server delay before giving a client its secret, allowing
357
optional manual denying of this specific client.
362
<refsect1 id="logging">
363
<title>LOGGING</title>
365
The server will send log message with various severity levels to
366
<filename>/dev/log</filename>. With the
367
<option>--debug</option> option, it will log even more messages,
368
and also show them on the console.
372
<refsect1 id="dbus_interface">
373
<title>D-BUS INTERFACE</title>
375
The server will by default provide a D-Bus system bus interface.
376
This interface will only be accessible by the root user or a
377
Mandos-specific user, if such a user exists. For documentation
378
of the D-Bus API, see the file <filename>DBUS-API</filename>.
382
<refsect1 id="exit_status">
383
<title>EXIT STATUS</title>
385
The server will exit with a non-zero exit status only when a
386
critical error is encountered.
390
<refsect1 id="environment">
391
<title>ENVIRONMENT</title>
394
<term><envar>PATH</envar></term>
397
To start the configured checker (see <xref
398
linkend="checking"/>), the server uses
399
<filename>/bin/sh</filename>, which in turn uses
400
<varname>PATH</varname> to search for matching commands if
401
an absolute path is not given. See <citerefentry>
402
<refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum>
410
<refsect1 id="files">
413
Use the <option>--configdir</option> option to change where
414
<command>&COMMANDNAME;</command> looks for its configurations
415
files. The default file names are listed here.
419
<term><filename>/etc/mandos/mandos.conf</filename></term>
422
Server-global settings. See
423
<citerefentry><refentrytitle>mandos.conf</refentrytitle>
424
<manvolnum>5</manvolnum></citerefentry> for details.
429
<term><filename>/etc/mandos/clients.conf</filename></term>
432
List of clients and client-specific settings. See
433
<citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>
434
<manvolnum>5</manvolnum></citerefentry> for details.
439
<term><filename>/var/run/mandos.pid</filename></term>
442
The file containing the process id of the
443
<command>&COMMANDNAME;</command> process started last.
448
<term><filename>/dev/log</filename></term>
451
The Unix domain socket to where local syslog messages are
457
<term><filename>/bin/sh</filename></term>
460
This is used to start the configured checker command for
461
each client. See <citerefentry>
462
<refentrytitle>mandos-clients.conf</refentrytitle>
463
<manvolnum>5</manvolnum></citerefentry> for details.
473
This server might, on especially fatal errors, emit a Python
474
backtrace. This could be considered a feature.
477
Currently, if a client is disabled due to having timed out, the
478
server does not record this fact onto permanent storage. This
479
has some security implications, see <xref linkend="clients"/>.
482
There is no fine-grained control over logging and debug output.
485
Debug mode is conflated with running in the foreground.
488
The console log messages do not show a time stamp.
491
This server does not check the expire time of clients’ OpenPGP
496
<refsect1 id="example">
497
<title>EXAMPLE</title>
500
Normal invocation needs no options:
503
<userinput>&COMMANDNAME;</userinput>
508
Run the server in debug mode, read configuration files from
509
the <filename>~/mandos</filename> directory, and use the
510
Zeroconf service name <quote>Test</quote> to not collide with
511
any other official Mandos server on this host:
515
<!-- do not wrap this line -->
516
<userinput>&COMMANDNAME; --debug --configdir ~/mandos --servicename Test</userinput>
522
Run the server normally, but only listen to one interface and
523
only on the link-local address on that interface:
527
<!-- do not wrap this line -->
528
<userinput>&COMMANDNAME; --interface eth7 --address fe80::aede:48ff:fe71:f6f2</userinput>
534
<refsect1 id="security">
535
<title>SECURITY</title>
536
<refsect2 id="server">
537
<title>SERVER</title>
539
Running this <command>&COMMANDNAME;</command> server program
540
should not in itself present any security risk to the host
541
computer running it. The program switches to a non-root user
545
<refsect2 id="clients">
546
<title>CLIENTS</title>
548
The server only gives out its stored data to clients which
549
does have the OpenPGP key of the stored fingerprint. This is
550
guaranteed by the fact that the client sends its OpenPGP
551
public key in the TLS handshake; this ensures it to be
552
genuine. The server computes the fingerprint of the key
553
itself and looks up the fingerprint in its list of
554
clients. The <filename>clients.conf</filename> file (see
555
<citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>
556
<manvolnum>5</manvolnum></citerefentry>)
557
<emphasis>must</emphasis> be made non-readable by anyone
558
except the user starting the server (usually root).
561
As detailed in <xref linkend="checking"/>, the status of all
562
client computers will continually be checked and be assumed
563
compromised if they are gone for too long.
566
If a client is compromised, its downtime should be duly noted
567
by the server which would therefore disable the client. But
568
if the server was ever restarted, it would re-read its client
569
list from its configuration file and again regard all clients
570
therein as enabled, and hence eligible to receive their
571
passwords. Therefore, be careful when restarting servers if
572
it is suspected that a client has, in fact, been compromised
573
by parties who may now be running a fake Mandos client with
574
the keys from the non-encrypted initial <acronym>RAM</acronym>
575
image of the client host. What should be done in that case
576
(if restarting the server program really is necessary) is to
577
stop the server program, edit the configuration file to omit
578
any suspect clients, and restart the server program.
581
For more details on client-side security, see
582
<citerefentry><refentrytitle>mandos-client</refentrytitle>
583
<manvolnum>8mandos</manvolnum></citerefentry>.
588
<refsect1 id="see_also">
589
<title>SEE ALSO</title>
592
<refentrytitle>mandos-clients.conf</refentrytitle>
593
<manvolnum>5</manvolnum></citerefentry>, <citerefentry>
594
<refentrytitle>mandos.conf</refentrytitle>
595
<manvolnum>5</manvolnum></citerefentry>, <citerefentry>
596
<refentrytitle>mandos-client</refentrytitle>
597
<manvolnum>8mandos</manvolnum></citerefentry>, <citerefentry>
598
<refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum>
604
<ulink url="http://www.zeroconf.org/">Zeroconf</ulink>
608
Zeroconf is the network protocol standard used by clients
609
for finding this Mandos server on the local network.
615
<ulink url="http://www.avahi.org/">Avahi</ulink>
619
Avahi is the library this server calls to implement
620
Zeroconf service announcements.
626
<ulink url="http://www.gnu.org/software/gnutls/"
631
GnuTLS is the library this server uses to implement TLS for
632
communicating securely with the client, and at the same time
633
confidently get the client’s public OpenPGP key.
639
RFC 4291: <citetitle>IP Version 6 Addressing
640
Architecture</citetitle>
645
<term>Section 2.2: <citetitle>Text Representation of
646
Addresses</citetitle></term>
647
<listitem><para/></listitem>
650
<term>Section 2.5.5.2: <citetitle>IPv4-Mapped IPv6
651
Address</citetitle></term>
652
<listitem><para/></listitem>
655
<term>Section 2.5.6, <citetitle>Link-Local IPv6 Unicast
656
Addresses</citetitle></term>
659
The clients use IPv6 link-local addresses, which are
660
immediately usable since a link-local addresses is
661
automatically assigned to a network interfaces when it
671
RFC 4346: <citetitle>The Transport Layer Security (TLS)
672
Protocol Version 1.1</citetitle>
676
TLS 1.1 is the protocol implemented by GnuTLS.
682
RFC 4880: <citetitle>OpenPGP Message Format</citetitle>
686
The data sent to clients is binary encrypted OpenPGP data.
692
RFC 5081: <citetitle>Using OpenPGP Keys for Transport Layer
697
This is implemented by GnuTLS and used by this server so
698
that OpenPGP keys can be used.
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
110
<term><literal>-h</literal>, <literal>--help</literal></term>
113
show a help message and exit
119
<term><literal>-i</literal>, <literal>--interface <replaceable>
120
IF</replaceable></literal></term>
129
<term><literal>-a</literal>, <literal>--address <replaceable>
130
ADDRESS</replaceable></literal></term>
133
Address to listen for requests on
139
<term><literal>-p</literal>, <literal>--port <replaceable>
140
PORT</replaceable></literal></term>
143
Port number to receive requests on
149
<term><literal>--check</literal></term>
152
Run self-test on the server
158
<term><literal>--debug</literal></term>
167
<term><literal>--priority <replaceable>
168
PRIORITY</replaceable></literal></term>
171
GnuTLS priority string. See <citerefentry>
172
<refentrytitle>gnutls_priority_init</refentrytitle>
173
<manvolnum>3</manvolnum></citerefentry>
179
<term><literal>--servicename <replaceable>NAME</replaceable>
183
Zeroconf service name
189
<term><literal>--configdir <replaceable>DIR</replaceable>
193
Directory to search for configuration files
705
<!-- Local Variables: -->
706
<!-- time-stamp-start: "<!ENTITY TIMESTAMP [\"']" -->
707
<!-- time-stamp-end: "[\"']>" -->
708
<!-- time-stamp-format: "%:y-%02m-%02d" -->