Re: Ordering wireguard interface init and daemon start

Nicolas George <[email protected]>
Newsgroups gmane.linux.debian.user
Message-ID <[email protected]>
Vincent Lee (HE12026-08-17):
> Hi debian-users,
> 
> My NAS is a Debian system, and it serves a couple webapps via a
> wireguard bastion host that serves as the public IP and reverse proxy.
> 
> The interface to the public internet is enp1s0, and the wireguard
> interface is wg0.
> 
> I'm struggling with how to configure things properly so that 1) the
> wireguard interface is only brought up when the backing internet
> connection enp1s0 is up

I am not seeing anything in your config that is supposed to ensure
that. Are you sure you did it? If so, please share or emphasize exactly
how.

>			   and 2) the webapps are only started when the
> wireguard interface is brought up.
<snip>
> Questions:

One question: what do the logs say?

Use journalctl to get the logs of around the time the network comes up,
remove everything that is unrelated, and look, the answer is likely to
be obvious.

Complement that with looking at systemctl status on all the services
involved, starting with networking.service, so that you do not
accidentally miss something.

When it happened to me, the answer was the wg interface came
up before the main interface and the DNS resolution for the wg endpoint
failed. All that was absolutely documented in the logs.

Regards,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.