WireGuard Archive on lore.kernel.org
 help / color / Atom feed
From: "Hendrik Friedel" <hendrik@friedels.name>
To: "Ivan Labáth" <labawi-wg@matrix-dream.net>
Cc: wireguard@lists.zx2c4.com
Subject: Re[2]: Keep-alive does not keep the connection alive
Date: Wed, 28 Aug 2019 06:06:23 +0000
Message-ID: <em99be8572-a929-4655-9c39-aa87955107e8@ryzen> (raw)
In-Reply-To: <20190826180244.GB5022@matrix-dream.net>

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

Hello,

yes, the Sever has a dynamic IP.

 >On the client, is the server peer ip correct?
Which entry are you refering to?
I assume
Endpoint = Dyn.IP:51820

Yes, but otherwise, the connection would not even be established, right?

For reference, here the complete client config:
[Interface]
Address = 10.192.122.3/32
PrivateKey = xx=

[Peer]
PublicKey = yy=
Endpoint = Dyn.IP:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25

Regards,
Hendrik



------ Originalnachricht ------
Von: "Ivan Labáth" <labawi-wg@matrix-dream.net>
An: "Hendrik Friedel" <hendrik@friedels.name>
Cc: "Vasili Pupkin" <diggest@gmail.com>; wireguard@lists.zx2c4.com
Gesendet: 26.08.2019 20:02:44
Betreff: Re: Keep-alive does not keep the connection alive

>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: 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 client,
>>  >can explain it further, it has nothing to do with keepalives though,
>>  >it is a bug in tun adapter implementation
>>  >
>>  >On Sun, Aug 25, 2019 at 6:38 PM Hendrik Friedel <hendrik@friedels.name> wrote:
>>  >>  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 Server. I want the Client to keep the connection alive all the time though, so that the Server can also initiate a connection to the Server when needed. Both, client and server are behind a NAT/Router.
>>  >>  I would think, that the "PersistentKeepalive = 25" on the Client would ckeep the connection open. The connection works fine while used. But after a while, I cannot connect from the Server to the client anymore.
>>  >>  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.
>>  >>
>>  >>  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

[-- Attachment #1.2: Type: text/html, Size: 5773 bytes --]

<html><head><style>#x4378ac1a8d5e4bd79733224344e79ff8{
	font-family:'Segoe UI';
	font-size:12pt;
	color:#000;
	margin-left:0px;
	margin-right:8px;
	background-color:#FFF;
}
#x4378ac1a8d5e4bd79733224344e79ff8{
	font-family:'Segoe UI';
	font-size:12pt;
}#xe2c1111c7c8047e6b2382a2787faad5a{
	font-family:'Segoe UI';
	font-size:12pt;
	color:#000;
	margin-left:0px;
	margin-right:8px;
	background-color:#FFF;
}
#xe2c1111c7c8047e6b2382a2787faad5a{
	font-family:'Segoe UI';
	font-size:12pt;
}</style>

<style id="css_styles" type="text/css">blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: right;'] {  list-style-position: inside;}
body { font-family: Segoe UI; font-size: 12pt;   }</style></head><body class="plain"><div>Hello,</div><div><br /></div><div>yes, the Sever has a dynamic IP.</div><div><br /></div><div>&gt;On the client, is the server peer ip correct?</div><div>Which entry are you refering to?</div><div><div id="xe2c1111c7c8047e6b2382a2787faad5a"><div style="zoom: 0.9;"><div>I assume </div><div>Endpoint = Dyn.IP:51820 </div><div><br /></div><div>Yes, but otherwise, the connection would not even be established, right?</div><div><br /></div><div>For reference, here the complete client config:</div><div><div id="x4378ac1a8d5e4bd79733224344e79ff8"><div><div>[Interface]</div><div>Address = 10.192.122.3/32</div><div>PrivateKey = xx=</div><div><br /></div><div>[Peer]</div><div>PublicKey = yy=</div><div>Endpoint = Dyn.IP:51820</div><div>AllowedIPs = 0.0.0.0/0</div><div>PersistentKeepalive = 25</div></div></div></div><div><br /></div><div>Regards,</div><div>Hendrik</div><div><br /></div></div></div></div><div><br /></div>
<div><br /></div>
<div>------ Originalnachricht ------</div>
<div>Von: "Ivan Labáth" &lt;labawi-wg@matrix-dream.net&gt;</div>
<div>An: "Hendrik Friedel" &lt;hendrik@friedels.name&gt;</div>
<div>Cc: "Vasili Pupkin" &lt;diggest@gmail.com&gt;; wireguard@lists.zx2c4.com</div>
<div>Gesendet: 26.08.2019 20:02:44</div>
<div>Betreff: Re: Keep-alive does not keep the connection alive</div><div><br /></div>
<div id="x5ecd9e8c2fd143e"><blockquote type="cite" class="cite2">

<div class="plain_line">Hello,</div>
<div class="plain_line"> </div>
<div class="plain_line">I notice you are using dynamic ips for server.</div>
<div class="plain_line">On the client, is the server peer ip correct?</div>
<div class="plain_line"> </div>
<div class="plain_line">Regards,</div>
<div class="plain_line">Ivan</div>
<div class="plain_line"> </div>
<div class="plain_line">On Sun, Aug 25, 2019 at 06:44:53PM +0000, Hendrik Friedel wrote:</div>
<blockquote type="cite" class="cite">
<div class="plain_line"> Hello,</div>
<div class="plain_line"> </div>
<div class="plain_line"> thanks for your reply.</div>
<div class="plain_line"> It is linux (Kernel 5.x) in both cases.</div>
<div class="plain_line"> </div>
<div class="plain_line"> Regards,</div>
<div class="plain_line"> Hendrik</div>
<div class="plain_line"> </div>
<div class="plain_line"> ------ Originalnachricht ------</div>
<div class="plain_line"> Von: "Vasili Pupkin" &lt;diggest@gmail.com&gt;</div>
<div class="plain_line"> An: "Hendrik Friedel" &lt;hendrik@friedels.name&gt;</div>
<div class="plain_line"> Cc: wireguard@lists.zx2c4.com</div>
<div class="plain_line"> Gesendet: 25.08.2019 17:59:59</div>
<div class="plain_line"> Betreff: Re: Keep-alive does not keep the connection alive</div>
<div class="plain_line"> </div>
<div class="plain_line"> &gt;What OS is running on client side? I have this issue on Win7 client,</div>
<div class="plain_line"> &gt;can explain it further, it has nothing to do with keepalives though,</div>
<div class="plain_line"> &gt;it is a bug in tun adapter implementation</div>
<div class="plain_line"> &gt;</div>
<div class="plain_line"> &gt;On Sun, Aug 25, 2019 at 6:38 PM Hendrik Friedel &lt;hendrik@friedels.name&gt; wrote:</div>
<div class="plain_line"> &gt;&gt;  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 Server. I want the Client to keep the connection alive all the time though, so that the Server can also initiate a connection to the Server when needed. Both, client and server are behind a NAT/Router.</div>
<div class="plain_line"> &gt;&gt;  I would think, that the "PersistentKeepalive = 25" on the Client would ckeep the connection open. The connection works fine while used. But after a while, I cannot connect from the Server to the client anymore.</div>
<div class="plain_line"> &gt;&gt;  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.</div>
<div class="plain_line"> &gt;&gt;</div>
<div class="plain_line"> &gt;&gt;  Only after a wg-quick down and up all is fine again.</div>
<div class="plain_line"> &gt;&gt;</div>
<div class="plain_line"> &gt;&gt;  Below some more information.</div>
<div class="plain_line"> &gt;&gt;</div>
<div class="plain_line"> &gt;&gt;  Can you help me to find, what I am doing wrong?</div>
<div class="plain_line"> </div>
<div class="plain_line"> _______________________________________________</div>
<div class="plain_line"> WireGuard mailing list</div>
<div class="plain_line"> WireGuard@lists.zx2c4.com</div>
<div class="plain_line"> https://lists.zx2c4.com/mailman/listinfo/wireguard</div>
</blockquote>
</blockquote></div>
</body></html>

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

  reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 19:13 Hendrik Friedel
     [not found] ` <CANH_QeYQ7hyBG1qK9PJB9E77gggW0NYe70vv8m6Dn=fU5zHQbg@mail.gmail.com>
2019-08-25 18:44   ` Re[2]: " Hendrik Friedel
2019-08-26 18:02     ` Ivan Labáth
2019-08-28  6:06       ` Hendrik Friedel [this message]
2019-08-28  6:17       ` Laszlo KERTESZ
2019-08-28  6:25         ` Re[2]: " Hendrik Friedel
2019-08-28  6:37           ` Laszlo KERTESZ
2019-08-28  6:54           ` Ivan Labáth
2019-08-28  7:43             ` Laszlo KERTESZ
2019-09-07 10:04             ` Re[2]: " Hendrik Friedel
2019-09-10  9:19               ` Ivan Labáth
2019-09-11 13:28                 ` Vincent Wiemann
2019-10-17 19:03                 ` Re[2]: " Hendrik Friedel
2019-10-20 20:25                   ` Ivan Labáth

Reply instructions:

You may reply publically 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=em99be8572-a929-4655-9c39-aa87955107e8@ryzen \
    --to=hendrik@friedels.name \
    --cc=labawi-wg@matrix-dream.net \
    --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

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git