ipconfig

Luks, Dropbear and PPP

The Dropbear ssh clients offers support for setting up point-to-point network configurations. For others out there that see errors like this:

Loading initial ramdisk ...
Loading, please wait ...
ipconfig: invalid protocol 'eth0'
ipconfig: invalid protocol 'eth0'
ipconfig: invalid protocol 'eth0'
ipconfig: invalid protocol 'eth0'
/scripts/init-premount/dropbear: .: line 32 can't open '/run/net-:eth0:.conf'

Note that you can probably fix these by inserting all details of your planned network configuration in (Debian’s)

/usr/share/initramfs-tools/scripts/init-premount/dropbear

followed by

update-initramfs -u

#!/bin/sh

PREREQ="udev devpts"

prereqs() {
        echo "$PREREQ"
}

case "$1" in
        prereqs)
                prereqs
                exit 0
        ;;
esac

. /scripts/functions

[ -x /sbin/dropbear ] || exit 0

log_begin_msg "Starting dropbear"

. /conf/initramfs.conf

for x in $(cat /proc/cmdline); do
        case "$x" in
                ip=*)
                        IPOPTS="${x#ip=}"
                        ;;
        esac
done

ip link set eth0 up
ip address add dev eth0 W.X.Y.Z peer 10.0.0.1
ip ro add default via 10.0.0.1

mkdir -p /var/run
/sbin/dropbear

Thanks to Wouter Hanegraaff who suggested this to me. See also Debian bug #584780 and this fix suggested on the German Ubuntuusers forum.

Avatar
Gijs Hillenius
Context for Digital Government

Policy specialist on open source in public services, knowlegde transfer expert