From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47CA9C3A5A1 for ; Wed, 28 Aug 2019 06:25:22 +0000 (UTC) Received: from krantz.zx2c4.com (krantz.zx2c4.com [192.95.5.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E251A2070B for ; Wed, 28 Aug 2019 06:25:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E251A2070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=friedels.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=wireguard-bounces@lists.zx2c4.com Received: from krantz.zx2c4.com (localhost [IPv6:::1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 08cfc23c; Wed, 28 Aug 2019 06:25:20 +0000 (UTC) Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 9c9d9f01 for ; Wed, 28 Aug 2019 06:25:18 +0000 (UTC) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.29.7]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id a37bd864 for ; Wed, 28 Aug 2019 06:25:18 +0000 (UTC) Received: from [92.76.198.6] (helo=[192.168.177.20]) by smtprelay03.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i2rOO-0005dr-J4; Wed, 28 Aug 2019 08:25:16 +0200 From: "Hendrik Friedel" To: "Laszlo KERTESZ" , =?utf-8?q?Ivan=20Lab=c3=a1th?= Subject: Re[2]: Keep-alive does not keep the connection alive Date: Wed, 28 Aug 2019 06:25:15 +0000 Message-Id: In-Reply-To: References: <20190826180244.GB5022@matrix-dream.net> User-Agent: eM_Client/7.2.34062.0 Mime-Version: 1.0 X-Df-Sender: aGVuZHJpa0BmcmllZGVscy5uYW1l Cc: wireguard@lists.zx2c4.com X-BeenThere: wireguard@lists.zx2c4.com X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Hendrik Friedel List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7236360665920135188==" Errors-To: wireguard-bounces@lists.zx2c4.com Sender: "WireGuard" --===============7236360665920135188== Content-Type: multipart/alternative; boundary="------=_MB59AF7700-3117-47DC-9A23-BC75759B56D7" --------=_MB59AF7700-3117-47DC-9A23-BC75759B56D7 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, that seems not to be the intended behaviour: If I understand correctly, the current behaviour is: At tunnel start the IP is resolved This IP is used for ever, namingly for re-connects. The probably intended behaviour would be: At tunnel start and at any re-connect the IP is resolved. Do you agree that this behaviour should be changed? Apart from that: Can you suggest an automatable workaround? Regards, Hendrik ------ Originalnachricht ------ Von: "Laszlo KERTESZ" An: "Ivan Lab=C3=A1th" Cc: "Hendrik Friedel" ; wireguard@lists.zx2c4.com Gesendet: 28.08.2019 08:17:32 Betreff: Re: Keep-alive does not keep the connection alive >I too use a server with dynamic ip. And the clients (Android, Linux)=20 >tend to lose connectivity permanently if the server's ip changes. With=20 >or without keepalive. > >The dynamic ip's dns entries are updated almost instantly when the ip=20 >changes so this is not dns related. Wireguard does not try to re=20 >establish connection, it keeps using the server ip acquired at the=20 >tunnel's start. Only way around this is restarting the interface. > >On Mon, Aug 26, 2019, 21:08 Ivan Lab=C3=A1th = =20 >wrote: >>Hello, >> >>I notice you are using dynamic ips for server. >>On the client, is the server peer ip correct? >> >>Regards, >>Ivan >> >>On Sun, Aug 25, 2019 at 06:44:53PM +0000, Hendrik Friedel wrote: >> > Hello, >> > >> > thanks for your reply. >> > It is linux (Kernel 5.x) in both cases. >> > >> > Regards, >> > Hendrik >> > >> > ------ Originalnachricht ------ >> > Von: "Vasili Pupkin" >> > An: "Hendrik Friedel" >> > Cc: wireguard@lists.zx2c4.com >> > Gesendet: 25.08.2019 17:59:59 >> > Betreff: Re: Keep-alive does not keep the connection alive >> > >> > >What OS is running on client side? I have this issue on Win7=20 >>client, >> > >can explain it further, it has nothing to do with keepalives=20 >>though, >> > >it is a bug in tun adapter implementation >> > > >> > >On Sun, Aug 25, 2019 at 6:38 PM Hendrik Friedel=20 >> wrote: >> > >> I have a setup in which the Server IP is known, whereas the=20 >>Client IP is changing. Thus, I rely on the Client to connect to the=20 >>Server. I want the Client to keep the connection alive all the time=20 >>though, so that the Server can also initiate a connection to the=20 >>Server when needed. Both, client and server are behind a NAT/Router. >> > >> I would think, that the "PersistentKeepalive =3D 25" on the Client= =20 >>would ckeep the connection open. The connection works fine while used.=20 >>But after a while, I cannot connect from the Server to the client=20 >>anymore. >> > >> I would assume that a ping from the Client to the IP of the=20 >>endpoint would help to re-alive the connection - but it does not. >> > >> >> > >> Only after a wg-quick down and up all is fine again. >> > >> >> > >> Below some more information. >> > >> >> > >> Can you help me to find, what I am doing wrong? >> > >> > _______________________________________________ >> > WireGuard mailing list >> > WireGuard@lists.zx2c4.com >> > https://lists.zx2c4.com/mailman/listinfo/wireguard >>_______________________________________________ >>WireGuard mailing list >>WireGuard@lists.zx2c4.com >>https://lists.zx2c4.com/mailman/listinfo/wireguard --------=_MB59AF7700-3117-47DC-9A23-BC75759B56D7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello,

that seems not to be the intended behavi= our:
If I understand correctly, the current behaviour is:

At tunnel start the IP is resolved
This IP is = used for ever, namingly for re-connects.


=
The probably intended behaviour would be:

=
At tunnel start and at any re-connect the IP is resolved.

Do you agree that this behaviour should be= changed?=C2=A0
Apart from that: Can you suggest an automatable wo= rkaround?

Regards,
Hendrik

------ Originalnachricht ------
Von: "Laszlo KERTESZ" <= laszlo.kertesz@gmail.com>
An: "Ivan Lab=C3=A1th" <labawi-wg@matrix-dream.net>
Gesendet: 28.08.2019 08:17:32
Betreff: Re: Keep-alive does not keep the connection alive
<= br />
I too use a server with dynamic ip. And the clients (Andr= oid, Linux) tend to lose connectivity permanently if the server's ip change= s. With or without keepalive.

The dynamic ip's dns entries are updated almost instantly when the ip cha= nges so this is not dns related. Wireguard does not try to re establish con= nection, it keeps using the server ip acquired at the tunnel's start. Only= way around this is restarting the interface.=C2=A0

On Mon, Aug 26, 2= 019, 21:08 Ivan Lab=C3=A1th <labawi-wg@matrix-dream.net> wrote:
Hello,

I notice you are using dynamic ips for server.
On the client, is the server peer ip correct?

Regards,
Ivan

On Sun, Aug 25, 2019 at 06:44:53PM +0000, Hendrik Friedel wrote:
> Hello,
>
> thanks for your reply.
> It is linux (Kernel 5.x) in both cases.
>
> Regards,
> Hendrik
>
> ------ Originalnachricht ------
> Von: "Vasili Pupkin" <diggest@gmail.com>
> An: "Hendrik Friedel" <hendrik@friedels.name>
> Cc: wi= reguard@lists.zx2c4.com
> Gesendet: 25.08.2019 17:59:59
> Betreff: Re: Keep-alive does not keep the connection alive
>
> >What OS is running on client side? I have this issue on Win7 clien= t,
> >can explain it further, it has nothing to do with keepalives thoug= h,
> >it is a bug in tun adapter implementation
> >
> >On Sun, Aug 25, 2019 at 6:38 PM Hendrik Friedel <hendrik@friedels.name> = wrote:
> >>=C2=A0 I have a setup in which the Server IP is known, whereas = the Client IP is changing. Thus, I rely on the Client to connect to the Se= rver. I want the Client to keep the connection alive all the time though, s= o that the Server can also initiate a connection to the Server when needed. = Both, client and server are behind a NAT/Router.
> >>=C2=A0 I would think, that the "PersistentKeepalive =3D 25" on = the Client would ckeep the connection open. The connection works fine whil= e used. But after a while, I cannot connect from the Server to the client a= nymore.
> >>=C2=A0 I would assume that a ping from the Client to the IP of = the endpoint would help to re-alive the connection - but it does not.
> >>
> >>=C2=A0 Only after a wg-quick down and up all is fine again.
> >>
> >>=C2=A0 Below some more information.
> >>
> >>=C2=A0 Can you help me to find, what I am doing wrong?
>
> _______________________________________________
> WireGuard mailing list
> WireGu= ard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard
_______________________________________________
WireGuard mailing list
WireGuard@l= ists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard
--------=_MB59AF7700-3117-47DC-9A23-BC75759B56D7-- --===============7236360665920135188== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ WireGuard mailing list WireGuard@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/wireguard --===============7236360665920135188==--