Package: openvpn
Version: 2.4.0-6
Severity: bug
Dear Maintainer,
Since Debian 9, OpenVPN does not start automatically on boot if the
instance is bound to a specific IP configured in /etc/network/interfaces:
Socket bind failed on local address [AF_INET] Cannot assign requested
address
The reason is OpenVPN starts before networking. Adding the following 2
lines to /lib/systemd/system/openvpn@.service solves the problem:
[Unit]
...
Wants=network-online.target
After=network-online.target
Best regards
Patrick
-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64
(x86_64)
Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages openvpn depends on:
ii debconf [debconf-2.0] 1.5.61
ii init-system-helpers 1.48
ii iproute2 4.9.0-1
ii libc6 2.24-10
ii liblz4-1 0.0~r131-2+b1
ii liblzo2-2 2.08-1.2+b2
ii libpam0g 1.1.8-3.6
ii libpkcs11-helper1 1.21-1
ii libssl1.0.2 1.0.2k-1
ii libsystemd0 232-23
ii lsb-base 9.20161125
Versions of packages openvpn recommends:
ii easy-rsa 2.2.2-2
Versions of packages openvpn suggests:
ii openssl 1.1.0e-2
pn resolvconf <none>
-- debconf information:
openvpn/create_tun: false