Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Celti Burroughs <celti@celti.name>
To: wireguard@lists.zx2c4.com
Subject: Re: wg-quick systemd service does not work directly after boot
Date: Wed, 7 Feb 2018 05:08:32 -0700	[thread overview]
Message-ID: <20180207050832.66a7f364@dana.celti.name> (raw)
In-Reply-To: <CAOAVeL3iu+xrhSLdNcLkR7X0nLQz8Uyb+dGAeecFtv3ArL=7Pw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

On Wed, 7 Feb 2018 10:03:43 +0100
Henning Reich <henning.reich@gmail.com> wrote:

> Hi,
> 
> I'm not sure if this a problem of wg/wg-quick or my system but maybe
> somebody can help.
> [snip] 
> It looks for me like wireguard can't resolve my remote site at this
> moment. I tried a static resolv.conf file and also systemd-resolved.
> Both sites have dynamic IPs so I can't use direct IPs.
> If I run "systemctl restart wg-quick@wg0" it works as expected, so my
> workaround is to add a 'sleep 5' to the service file.
> 
> Any better solutions or is this a "bug"?
> 
> Merci

wg-quick@.service orders itself After=network-online.target. Systemd
will only activate this target once it knows the network is online,
which it can only know if your network manager tells it that. You'll
need to enable the appropriate service:
  NetworkManager-wait-online.service
  systemd-networkd-wait-online.service
  ifup-wait-all-auto.service

Enable whichever of those is appropriate for your configuration,
reboot, and see if it works this time.

~Celti

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-02-07 12:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07  9:03 Henning Reich
2018-02-07 12:08 ` Celti Burroughs [this message]
2018-02-07 11:54 Mytril
2018-02-07 13:06 ` Matthias Urlichs
2018-02-08 19:14   ` jugs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180207050832.66a7f364@dana.celti.name \
    --to=celti@celti.name \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).