Is it possible to disable wireguard on specific Wi-Fi ?
Nohk Two
nohktwo at gmail.com
Fri Apr 22 11:05:40 UTC 2022
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.
More information about the WireGuard
mailing list