You are not logged in.
Hi,
To connect to vpn on boot I created a file
/etc/vpnc/ipsec-rz.conf
and ran
systemctl enable vpnc@ipsec-rz
as root, however after reboot
systemctl status vpnc@ipsec-rz
yields
Feb 15 11:12:20 lens systemd[1]: Starting VPNC connection to ipsec-rz...
Feb 15 11:12:20 lens vpnc[369]: /usr/bin/vpnc: unknown host `ipsec-rz.vpn.uni-freiburg.de'
Feb 15 11:12:20 lens systemd[1]: vpnc@ipsec-rz.service: Control process exited, code=exited status=1
Feb 15 11:12:20 lens systemd[1]: Failed to start VPNC connection to ipsec-rz.
Feb 15 11:12:20 lens systemd[1]: vpnc@ipsec-rz.service: Unit entered failed state.
Feb 15 11:12:20 lens systemd[1]: vpnc@ipsec-rz.service: Failed with result 'exit-code'.
When I run
systemctl start vpnc@ipsec-rz
I succeed. I already tried setting
User=root
in
/etc/systemd/system/multi-user.target.wants/vpnc@ipsec-rz.service
as well as
Requires=network.target
or
WantedBy=network.target
without success. Thank you for any advice!
Last edited by koesmi (2017-02-18 23:13:32)
Offline
I was able to solve that myself as follows. First, I had dhcpcd running as service, which I changed to systemd-networkd. Then I followed this post to make vpnc@ipsec-rz wait until the network is online; that is in
/etc/systemd/system/multi-user.target.wants/vpnc@ipsec-rz.service
I changed the respective entries to
[Unit]
Wants=network-online.target
After=network.target network-online.target
and ran
systemctl enable systemd-networkd-wait-online
Since I used the default vpnc@.service coming with systemd before, I can imagine there are others with this issue, so I hope the post helps.
Offline