Development discussion of WireGuard
 help / color / mirror / Atom feed
From: em12345 <em12345@web.de>
To: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Multiple Endpoints
Date: Sat, 7 Jan 2017 17:45:35 +0100	[thread overview]
Message-ID: <89477ad4-b015-d0a1-1c05-ea6600b2f464@web.de> (raw)
In-Reply-To: <CAHmME9p4WOB96v6P1E2yGZcpEXdRfG7e=vK1nUwCE953tx1SSA@mail.gmail.com>

Hi Jason,

I'm not sure that I'm understanding the roaming feature in WireGuard.

>From your response it sounds like once a connection is established, then
the server can inform the client about a server IP change.

This would require PersistentKeepalive on "server" side. But assuming
the common case that the client sits behind a stateful firewall, how
would the server be able to inform the client about its IP change?

On a server IP change:

- the client still sends UDP packages to old server IP, which is useless

- the server (from its new IP) can send UDP packages to the still
remembered client IP (because of PersistentKeepalive). But my
understanding is that stateful firewalls will block UDP packages from
the new IP until the client has send an UDP to the new server IP.

So in such a scenario the roaming feature wouldn't help.

Thanks

Emmanuel



> Hello,
> 
> Keep in mind that WireGuard's roaming property means that while the
> two peers are communicating, they'll automatically be updating to each
> others' latest IP addresses. One way to ensure that they _keep_
> communicating is by using the PersistentKeepalive feature. This then
> shifts the problem to "how do they start communicating", in which case
> you can just use a little resolve,ping,resolve,ping loop on your
> various dyndns services.
> 
> But, in case you want a different architecture, I'll directly answer
> your questions:
> 
> - wg setconf/addconf/set can be run at any time, before or after the
> link is up, and before or after peers are communicating. It returns
> and succeeds immediately, leaving the actual negotiation to be done
> whenever data needs to be sent.
> - The same goes for `ip link up`, with the sole exception that `ip
> link up` may fail if the UDP port is already in use by a different
> program.
> - The best way to determine if a wireguard link is up is if you can
> send a ping through the tunnel.
> - Your syntax doesn't make sense for endpoint setting. What you want
> is: `wg set wg0 peer ABCDEFG... endpoint 1.2.3.4:1234`. So, yes, you
> can individually set the endpoint of a peer.
> 
> Jason
> 

  reply	other threads:[~2017-01-07 16:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-07 14:43 em12345
2017-01-07 15:23 ` Jason A. Donenfeld
2017-01-07 16:45   ` em12345 [this message]
2017-01-08 14:12     ` Baptiste Jonglez
2017-01-08 14:39       ` Jörg Thalheim
2017-01-08 21:22         ` Baptiste Jonglez
2017-01-08 22:19         ` Jason A. Donenfeld
2017-01-08 22:18       ` Jason A. Donenfeld
2017-01-08 22:57         ` Baptiste Jonglez
2017-01-08 23:00           ` Jason A. Donenfeld
2017-01-09 11:35             ` Varying source address and stateful firewalls (Was: Multiple Endpoints) Baptiste Jonglez
2017-01-10  4:32               ` Jason A. Donenfeld
2017-01-15 10:01             ` Multiple Endpoints Jason A. Donenfeld
2017-01-08 22:14     ` Jason A. Donenfeld

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=89477ad4-b015-d0a1-1c05-ea6600b2f464@web.de \
    --to=em12345@web.de \
    --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).