Development discussion of WireGuard
 help / color / mirror / Atom feed
* Is a hostname a valid value value for Endpoint?
@ 2018-06-18 19:49 Jonathan Hult
  2018-06-21 23:55 ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Hult @ 2018-06-18 19:49 UTC (permalink / raw)
  To: wireguard

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

Greetings,

I would like to know if a hostname is a valid value for *Endpoint*? Today,
the documentation all seems to reference an IP address.

Today, Mullvad <https://mullvad.net/en/> currently sets *EndPoint* to a
hostname (see here <https://api.mullvad.net/public/relays/wireguard/v1/>)

In my case, my host is set to use a DNS server which routes VPN provider
domains to a bad IP (in order to block them).

1. If *EndPoint* should never be a hostname, perhaps we should prevent (or
at least warn) when it is found to be a hostname (instead of an IP address).

2. If *EndPoint* can be a hostname, then I think we want to ensure DNS is
set from the configuration file before attempting to connect. In the wg-quick
script <https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick/linux.bash>,
I updated the *cmd_up()* function to call *set_dns()* earlier on than it is
currently called. This prevents my host's original DNS server from blocking
anything.

Jonathan

[-- Attachment #2: Type: text/html, Size: 2808 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Is a hostname a valid value value for Endpoint?
  2018-06-18 19:49 Is a hostname a valid value value for Endpoint? Jonathan Hult
@ 2018-06-21 23:55 ` Jason A. Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2018-06-21 23:55 UTC (permalink / raw)
  To: jonathan; +Cc: WireGuard mailing list

The endpoint can contain a domain, yes.

However, the correct behavior is to look up that domain using the DNS
server that exists prior to turning on WireGuard. Otherwise you'd have
a chicken&egg problem with tunnel-only accessible DNS servers.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-21 23:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18 19:49 Is a hostname a valid value value for Endpoint? Jonathan Hult
2018-06-21 23:55 ` Jason A. Donenfeld

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).