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 f272b6ed for ; Thu, 3 Aug 2017 12:38:00 +0000 (UTC) Received: from frisell.zx2c4.com (frisell.zx2c4.com [192.95.5.64]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id cda83174 for ; Thu, 3 Aug 2017 12:38:00 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 8085255e for ; Thu, 3 Aug 2017 12:57:03 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id b7f8c64d (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Thu, 3 Aug 2017 12:57:03 +0000 (UTC) Received: by mail-io0-f171.google.com with SMTP id j32so6686599iod.0 for ; Thu, 03 Aug 2017 05:59:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: "Jason A. Donenfeld" Date: Thu, 3 Aug 2017 14:59:10 +0200 Message-ID: Subject: Re: Multihomed server issue To: Wang Jian 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: , Hi Wang, I understand your inquiry and I see what you're trying to accomplish with your use of ip rule and fwmark. However, *WireGuard already does this automatically*. We _do_ support reply-to-sender. We _do_ supported multihomed servers. You wrote, "But I do wish that server can deduce public address which the client connects to, and use the public address to response to the client, then the configuration will be simple and straightforward." WireGuard _does_ do this. To demonstrate that, I've added a more explicit test of this to the test suite: https://git.zx2c4.com/WireGuard/commit/?id=bf44c07a805a5e40408059ac60dfc526196a3797 If this is not working for you, then you're either doing something wrong, or you've uncovered a bug in either WireGuard or the kernel. In case it's the latter, would you send me a patch for netns.sh that demonstrated the problem in a clear way? Thanks, Jason