From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Jason@zx2c4.com Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id ec64cf7b for ; Sun, 8 Jan 2017 22:04:56 +0000 (UTC) Received: from frisell.zx2c4.com (frisell.zx2c4.com [192.95.5.64]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 09406f68 for ; Sun, 8 Jan 2017 22:04:56 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id a99c599c for ; Sun, 8 Jan 2017 22:04:56 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id d1552abb (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Sun, 8 Jan 2017 22:04:56 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id 128so477778990oig.0 for ; Sun, 08 Jan 2017 14:14:27 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <89477ad4-b015-d0a1-1c05-ea6600b2f464@web.de> References: <6d000312-635f-a361-200a-936da7ce7e17@web.de> <89477ad4-b015-d0a1-1c05-ea6600b2f464@web.de> From: "Jason A. Donenfeld" Date: Sun, 8 Jan 2017 23:14:25 +0100 Message-ID: Subject: Re: Multiple Endpoints To: em12345 Content-Type: text/plain; charset=UTF-8 Cc: WireGuard mailing list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, Jan 7, 2017 at 5:45 PM, em12345 wrote: > 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? Yes, the server would need the PersistentKeepalive; you're right. > - 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. No, usually not. In most cases, the NAT mapping depends on the client's local IP and sport/dport, but not on the remote dst IP. Otherwise common NAT holepunching schemes like STUN and the example holepuncher [1] wouldn't work. The new UDP packets will make it to the client, in fact. [1] https://git.zx2c4.com/WireGuard/tree/contrib/examples/nat-hole-punching/README