Development discussion of WireGuard
 help / color / mirror / Atom feed
From: tlhackque <tlhackque@yahoo.com>
To: wireguard@lists.zx2c4.com
Subject: Re: Wireguard Windows Service Issues
Date: Mon, 17 Jan 2022 06:18:55 -0500	[thread overview]
Message-ID: <56d2209f-f655-6302-df6d-bce587c8368d@yahoo.com> (raw)
In-Reply-To: <e48d98ba2ad34d2f86fb34e5c95aebaf@rozman.si>


[-- Attachment #1.1: Type: text/plain, Size: 1849 bytes --]

On 17-Jan-22 05:51, Simon Rozman wrote:
> Hi,
>
>
> WireGuard services start early on boot - sometimes even before the DNSCache (DNS Client). If the service can't resolve hostnames used in the config file, it will stop. But it will log this. Resolution to this problem is:
> - Use IPs rather than hostnames.
> - Add hostnames you use in your .conf file to C:\Windows\system32\drivers\etc\hosts.
> - Add DNSCache dependency to the WireGuardTunnel$<your tunnel name> service.
>
> I personally would pick one of the first two options above. Don't like the idea my laptop is asking a coffee shop's DNS what is my VPN endpoint IP address.
>
>
 From this description, it seems that there's room for improvement.

It doesn't seem reasonable for the WireGuard service to stop. Log and 
perhaps display an error, sure.  But stopping seems harsh, and would 
prevent other tunnel endpoints from working - not a good user experience.

It would seem better for the service to set a timer and retry failures 
periodically - many DNS issues are transient.

It also seems to me that it would be better for the default to be option 
3 - make all tunnels dependent on DNSCache without requiring any 
user/admin action.  One could condition this on an endpoint being 
specified as a hostname, but that doesn't seem worth the effort.  Pretty 
much any use of a tunnel needs name resolution.  Even if your resolvers 
are at the other end of the tunnel, starting the client before it's up 
is harmless.

Anyone concerned about DNS snooping on name resolution of the endpoints 
can avoid it by using either of the other two options: hardcoded IP in 
the configuration, or an entry in "hosts".

"It just works" seems much more desirable than mystery service stops.  A 
UI status "waiting for hostname resolution" would be ideal.



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

  reply	other threads:[~2022-01-17 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 18:47 Tony Pros
2022-01-17 10:51 ` Simon Rozman
2022-01-17 11:18   ` tlhackque [this message]
2022-01-17 12:47     ` Simon Rozman
2022-01-21 21:03   ` Tony Pros
2022-01-24 14:47     ` Simon Rozman
2022-01-24 18:17   ` Simon McNair

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=56d2209f-f655-6302-df6d-bce587c8368d@yahoo.com \
    --to=tlhackque@yahoo.com \
    --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).