* 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/$(dpkg-architecture -qDEB_HOST_MULTIARCH \ )/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 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 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 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 "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 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::" 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=
:" needs to be manually added to the file "/etc/mandos/plugin-runner.conf". -- Teddy Hogeborn , Mon, 28 Oct 2013 11:02:26 +0100