On 2026-08-17, Vincent Lee wrote:

> auto wg0
> iface wg0 inet static
>         address 10.0.0.2
>         netmask 255.255.255.0
>         pre-up ip link add $IFACE type wireguard
>         pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf
>         post-down ip link del $IFACE

I don't use wireguard but openvpn which create its interfaces. Are you
sure wg0 needs to be created before wireguard start ? wireguard cannot
create it ?

> In the webapp systemd service files, I have Requires= and After=
> requirements on network-online.target, so the webapp should not be
> started until ifupdown-wait-online succeeds. The webapp binds to the
> 10.0.0.2 wireguard IP.

wait-online.sh waits for interfaces and addresses in
/etc/default/networking

> Even though the webapp has a dependency on network-online.target, it
> starts anyways and fails to bind to the 10.0.0.2 IP because the wg0
> interface didn't come up.

Perhaps it would be better if the webapp depends on wireguard

Reply via email to