Determine whether the failure is limited to boot
- Compare the VPN unit’s current-boot log with the active network manager’s logs, such as NetworkManager or systemd-networkd.
- Record when the service failed, the default route appeared, DNS became usable, and the listener opened. Use journal timestamps instead of relying on “it worked later.”
- If the service also disconnects during normal operation, investigate the VPN process, upstream gateway, and DNS rather than attributing every fault to boot ordering.
Check the targets and matching wait-online implementation
Use `systemctl show your-vpn.service -p Wants -p After` to inspect dependencies, then check `systemctl list-dependencies network-online.target` and the status of `NetworkManager-wait-online.service` and `systemd-networkd-wait-online.service` to identify the implementation actually in use. systemd documents `network-online.target` for units that strictly need configured networking and leaves the precise readiness condition to the network manager. Do not assume both wait-online services should be enabled.
Consider the cost of waiting before changing ordering
Adding a dependency on `network-online.target` makes the service wait for the network manager to report readiness; a misconfigured wait service can also slow or stall boot. If ordering is confirmed as the cause, have an administrator adjust the wait-online configuration and unit dependencies for the actual distribution and network stack, with a reasonable timeout. Afterward, verify the full boot log, DNS resolution, and external route—not just whether the target became active.