Development discussion of WireGuard
 help / color / mirror / Atom feed
* ExtIP change no new handshake
       [not found] <630889583.2626955.1519303108947.ref@mail.yahoo.com>
@ 2018-02-22 12:38 ` Hannes Wagner
  2018-02-22 14:34   ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Wagner @ 2018-02-22 12:38 UTC (permalink / raw)
  To: wireguard

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

I stumbled upon the following observation. I have a router with an dynamic external IP with changes every 24h. It can be reached via it's dyndns test.test.zzz. Client1 and 2 have the same config to reach the endpoint:[Peer]
PublicKey = 5JZzs90SBYzXc8pfDW......
Endpoint = test.test.zzz:443
PersistentKeepAlive=3600
Client2 Ext IP 145.x.y.z wg0 10.2.1.3
    |
    |
Router IP 10.1.1.1  Dynamic Ext IP 83.x1.y1.z1 (after 24h/change to 84.x2.y2.z2) dyndns: test.test.zzz
   |                                                  |
   |                                                  |        Client1 10.1.1.3 wg0 10.2.1.2         Server 10.1.1.2 wg0 10.2.1.1
After the external IP address changes I cannot reach client1 from server or client2 on it's wireguard wg0 device.
wg show on client1 
peer: 5JZzs90SBYzXc8pfDW......
endpoint: 83.x.y.z:443
allowed ips: 10.2.0.0/16
latest handshake: 8 hours, 14 minutes, 42 seconds ago
transfer: 9.98 KiB received, 49.73 KiB sent
persistent keepalive: every 6 minutes

wg show on server
peer: 9BhasduiUTa3d.....
endpoint: 83.x.y.z:43765
allowed ips: 10.2.1.2/32
latest handshake: 8 hours, 14 minutes, 42 seconds ago
transfer: 22.73 KiB  received, 169.98 KiB sent

Both devices still list the old external IP. Although on client1 and server test.test.zzz resolves to it's new external IP 84.x2.y2.z2. I know that I could fix this by entering the internal IP of the server as the endpoint address on client1, but I thought that if the server couldn't be reached any more a new handshake process (with DNS lookup) would be initiated?  



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

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

* Re: ExtIP change no new handshake
  2018-02-22 12:38 ` ExtIP change no new handshake Hannes Wagner
@ 2018-02-22 14:34   ` Jason A. Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2018-02-22 14:34 UTC (permalink / raw)
  To: Hannes Wagner; +Cc: wireguard

You can either try to set persistent-keepalive on the server, so it
notifies the clients about its change in address, or you can use
something like reresolve-dns.sh to reresolve your dynamic dns at
intervals: https://git.zx2c4.com/WireGuard/tree/contrib/examples/reresolve-dns

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

end of thread, other threads:[~2018-02-22 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <630889583.2626955.1519303108947.ref@mail.yahoo.com>
2018-02-22 12:38 ` ExtIP change no new handshake Hannes Wagner
2018-02-22 14:34   ` 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).