/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
This file documents the next steps to take after installation of the
Debian package, and also contain some notes specific to the Debian
packaging which are not also in the manual.

* Adding a Client Password to the Server
  
  The server must be given a password to give back to the client on
  boot time.  This password must be a one which can be used to unlock
  the root file system device.  On the *client*, run this command:
  
	mandos-keygen --password
  
  It will prompt for a password and output a config file section.
  This output should be copied to the Mandos server and added to the
  file "/etc/mandos/clients.conf" there.

* Testing that it Works (Without Rebooting)
  
  After the server has been started with this client's key added, it
  is possible to verify that the correct password will be received by
  this client by running the command, on the client:
  
	MANDOSPLUGINHELPERDIR=/usr/lib/$(dpkg-architecture \
	-qDEB_HOST_MULTIARCH)/mandos/plugin-helpers \
	/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH \
	)/mandos/plugins.d/mandos-client \
		--pubkey=/etc/keys/mandos/pubkey.txt \
		--seckey=/etc/keys/mandos/seckey.txt \
		--tls-privkey=/etc/keys/mandos/tls-privkey.pem \
		--tls-pubkey=/etc/keys/mandos/tls-pubkey.pem; echo
  
  This command should retrieve the password from the server, decrypt
  it, and output it to standard output.  There it can be verified to
  be the correct password, before rebooting.

* Emergency Escape
  
  If it ever should be necessary, the Mandos client can be temporarily
  prevented from running at startup by passing the parameter
  "mandos=off" to the kernel.

* Specifying a Client Network Interface
  
  At boot time the network interfaces to use will by default be
  automatically detected.  If this should result in incorrect
  interfaces, edit the DEVICE setting in the
  "/etc/initramfs-tools/initramfs.conf" file.  (The default setting is
  empty, meaning it will autodetect the interfaces.)  *If* the DEVICE
  setting is changed, it will be necessary to update the initrd image
  by running this command:
  
	(For initramfs-tools:)
	update-initramfs -k all -u
	
	(For dracut:)
	dpkg-reconfigure dracut
  
  The device can also be overridden at boot time on the Linux kernel
  command line using the sixth colon-separated field of the "ip="
  option; for exact syntax, read the documentation in the file
  "/usr/share/doc/linux-doc-*/Documentation/filesystems/nfs/nfsroot.txt",
  available in the "linux-doc-*" package.
  
  Note that since the network interfaces are used in the initial RAM
  disk environment, the network interfaces *must* exist at that stage.
  Thus, an interface can *not* be a pseudo-interface such as "br0" or
  "tun0"; instead, only real interfaces (such as "enp1s0" or "eth0")
  can be used. This can be overcome by writing a "network hook"
  program to create an interface (see mandos-client(8mandos)) and
  placing it in "/etc/mandos/network-hooks.d", from where it will be
  copied into the initial RAM disk.  Example network hook scripts can
  be found in "/usr/share/doc/mandos-client/examples/network-hooks.d".

* User-Supplied Plugins
  
  Any plugins found in "/etc/mandos/plugins.d" will override and add
  to the normal Mandos plugins.  When adding or changing plugins, do
  not forget to update the initial RAM disk image:
  
	(For initramfs-tools:)
	update-initramfs -k all -u
	
	(For dracut:)
	dpkg-reconfigure dracut

* Do *NOT* Edit "/etc/crypttab"
  
  It is NOT necessary to edit "/etc/crypttab" to specify
  "/usr/lib/mandos/plugin-runner" as a keyscript for the root file
  system; if no keyscript is given for the root file system, the
  Mandos client will be the new default way for getting a password for
  the root file system when booting.

* Non-local Connection (Not Using ZeroConf)
  
  If the "ip=" kernel command line option is used to specify a
  complete IP address and device name, as noted above, it then becomes
  possible to specify a specific IP address and port to connect to,
  instead of using ZeroConf.  The syntax for doing this is
  "mandos=connect:<IP_ADDRESS>:<PORT_NUMBER>" on the kernel command
  line.
  
  For very advanced users, it is possible to specify simply
  "mandos=connect" on the kernel command line to make the system only
  set up the network (using the data in the "ip=" option) and not pass
  any extra "--connect" options to mandos-client at boot.  For this to
  work, "--options-for=mandos-client:--connect=<ADDRESS>:<PORT>" needs
  to be manually added to the file "/etc/mandos/plugin-runner.conf".

* Diffie-Hellman Parameters

  On installation, a file with Diffie-Hellman parameters,
  /etc/keys/mandos/dhparams.pem, will be generated and automatically
  installed into the initial RAM disk image and also used by the
  Mandos Client on boot.  If different parameters are needed for
  policy or other reasons, simply replace the existing dhparams.pem
  file and update the initial RAM disk image.

 -- Teddy Hogeborn <teddy@recompile.se>, Sun,  8 Sep 2024 02:09:20 +0200