I am using Android to connect to my WireGuard server through the public IP address of the host network. The LAN is using addresses 192.168.0.1-255
. I would like the client to connect through the VPN only to addresses with in the LAN and directly access the others. The config is as follows:
[Interface]
PrivateKey = xxx=
Address = 198.18.7.4/32
DNS = 192.168.0.1
[Peer]
PublicKey = xxx=
AllowedIPs = 192.168.0.1/24
Endpoint = my.public.IP:51820
But I am getting a "Bad Address" for whatever I tried to use except for /32
. Not being familiar with Subnet Address scheme, I tried to use the table and calculator here which seems to tell me that /24 is the correct subnet. On Windows this seems to work fine.
Any Idea what can be wrong here? Is the AllowedIPs wrong? Or is there an issue with Android that is not in my control?
Thanks!