/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk
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
* 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:
  
	/usr/lib/mandos/plugins.d/mandos-client \
		--pubkey=/etc/keys/mandos/pubkey.txt \
		--seckey=/etc/keys/mandos/seckey.txt; 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 interface to use will by default be
  automatically detected.  If should result in an incorrect interface,
  edit the DEVICE setting in the "/etc/initramfs-tools/initramfs.conf"
  file.  (The default setting is empty, meaning to autodetect the
  interface.)  *If* the DEVICE setting is changed, it will be
  necessary to update the initrd image by running the command
  
	update-initramfs -k all -u
  
  The device can 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/nfsroot.txt",
  available in the "linux-doc-*" package.
  
  Note that since this network interface is used in the initial RAM
  disk environment, the network interface *must* exist at that stage.
  Thus, the interface can *not* be a pseudo-interface such as "br0" or
  "tun0"; instead, only real interface (such as "eth0") can be used.
  This can be overcome by writing a "network hook" program to create
  the 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/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 initital RAM disk image:
  
	update-initramfs -k all -u

* 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 it 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".

 -- Teddy Hogeborn <teddy@recompile.se>, Mon, 28 Nov 2011 23:07:22 +0100