Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Max Schulze <max.schulze@online.de>
To: Roman Mamedov <rm@romanrm.net>, Vicente Bergas <vicencb@gmail.com>
Cc: wireguard@lists.zx2c4.com
Subject: Re: lost connection on dynamic IP
Date: Thu, 20 May 2021 21:23:50 +0200	[thread overview]
Message-ID: <cfef7862-cae8-6d13-269b-d01aa6f0a2b4@online.de> (raw)
In-Reply-To: <20210520212056.1ddd3d5a@natsu>


On 20.05.21 18:20, Roman Mamedov wrote:
> On Thu, 20 May 2021 11:15:30 +0500
> Roman Mamedov <rm@romanrm.net> wrote:
>
>>> So, what do you mean is that wireguard does a single DNS resolution at
>>> the beginning and further DNS resolutions need to be done elsewere. Is
>>> that correct?
>> Yes.
> I also remembered a case where just PersistentKeepalive won't save you, and
> periodic DNS resolution on clients becomes mandatory. It is when the server's
> physical location gets a power cut. On new boot-up (and router power-on) it
> gets a new IP from the ISP, and has no idea where all the clients are. The
> communication is broken until clients recheck the DNS record and update the
> server's endpoint from that. WG does not do this on its own.
>

Just to point out what 'others are doing' - openwrt has a watchdog 
script [1] that might be run with cron every 15 mins


*/15 * * * * /usr/bin/wireguard_watchdog


which will update the new endpoint if the last handshake is too old:

wg set ${iface} peer ${public_key} endpoint 
"${endpoint_host}:${endpoint_port}"


It needs PersistenKeepalive also, if i understand correctly.

[1] 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/utils/wireguard-tools/files/wireguard_watchdog;hb=HEAD


--

Max


  reply	other threads:[~2021-05-21  0:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 11:22 Vicente Bergas
2021-05-19 18:43 ` Roman Mamedov
2021-05-19 22:28   ` Vicente Bergas
2021-05-20  6:15     ` Roman Mamedov
2021-05-20 16:20       ` Roman Mamedov
2021-05-20 19:23         ` Max Schulze [this message]
2021-05-23 11:44           ` Vicente Bergas

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=cfef7862-cae8-6d13-269b-d01aa6f0a2b4@online.de \
    --to=max.schulze@online.de \
    --cc=rm@romanrm.net \
    --cc=vicencb@gmail.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).