Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Nohk Two <nohktwo@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: Re: Is it possible to disable wireguard on specific Wi-Fi ?
Date: Fri, 22 Apr 2022 19:05:40 +0800	[thread overview]
Message-ID: <1b8b8a8d-0805-2b88-4fbb-f0a05cb2d0d0@gmail.com> (raw)
In-Reply-To: <fd11943c-99e1-d0a0-b28b-de7d5c617eb3@oern.de>

On 2022/4/22 14:16, Björn Fries wrote:
> Hello,
> 
> Am 18.04.22 um 04:12 schrieb Nohk Two:
>> This server allows the clients to access my LAN (e.g. 192.168.87.0/24) 
>> and 
> [..]
>> But when the phones connect to the Wi-Fi of my home's router, the DHCP 
>> assigns the IP addresses as 192.168.87.0/24, it's my LAN, to the phones. 
> [...]
>> Or do you have better ideas ?
> 
> the way I solve this is that I use a slightly larger /23-subnet in the
> AllowedIPs=192.168.87.0/23
> 
> and when I get a local IP inside 192.168.87.0/24 at home, the kernel 
> automatically uses the more specific route.
I think I know your point. And since my network is 192.168.87.0/24, I 
have to use 192.168.86.0/23 (not 192.168.87.0/23) in the AllowedIPs. 
Because "87" is an odd number and it's "1000 0111" in binary

However, it failed in my Android phone. There is no internet accessing 
as usual. I didn't try this in iPhone because Eugenio Tampieri told me 
that Wireguard for iOS has the feature I required (and worked nicely) 
but not Android.

Maybe I have to adjust my LAN's network to even number to make /24 
enlarge to /23 happy.

Thank you very much.

  parent reply	other threads:[~2022-04-22 11:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  2:12 Nohk Two
2022-04-22  6:16 ` Björn Fries
2022-04-22  9:51   ` Björn Fries
2022-04-22 13:00     ` Nohk Two
2022-04-22 11:05   ` Nohk Two [this message]
2022-04-22 13:40     ` Björn Fries
2022-04-22 15:55       ` Nohk Two
2022-04-22 13:36 ` Jason Grant
2022-04-22 18:23 ` Kai Haberzettl
2022-04-23  2:01   ` Nohk Two
     [not found] <77422@imapsync>
2022-04-22  9:29 ` wireguard
2022-04-22 12:08   ` Nohk Two

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=1b8b8a8d-0805-2b88-4fbb-f0a05cb2d0d0@gmail.com \
    --to=nohktwo@gmail.com \
    --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).