difference in Wireguard behavior between laptop and phone
Posted: Thu Nov 23, 2023 12:34 pm
Hi, there is a difference in Wireguard behavior between my laptop and an Android phone that I don't completely understand, therefore looking for explanation.
The setup:
I have a MT router running Wireguard in my home network. The wireguard1 interface IP is 192.168.255.1.
Then I have 2 devices in road warrior mode: a Linux laptop and an Android phone.
The laptop's Wireguard IP is 192.168.255.4.
The phone's Wireguard IP is 192.168.255.3.
Both devices have 192.168.2.0/24 (my home network) and 192.168.255.1/32 in Allowed IPs.
On the router, in the Peers settings, I have:
- the laptop Peer has 192.168.255.4 in Allowed Address
- the phone Peer has 192.168.255.3 in Allowed Address
With these settings:
The laptop is able to handshake and access my network without any problem.
The phone is able only to handshake. It cannot access any IP inside my network.
I found a way to fix this though: on the router, in the phone Peer settings, I can add 0.0.0.0/0 (or the actual IP that the phone has at that moment) into its Allowed Address - then I am able to access my network from the phone as well.
The question: why is this additional Allowed IP needed for the phone? The laptop works without it just fine.
What is even more interesting: when I "fix" the problem this way and establish the tunnel from the phone, I can then safely remove the additional Allowed IP on the router in the phone Peer settings and keep only 192.168.255.3 there. After this change, the phone will still be able to establish the tunnel AND access my network. All will be working fine until I reboot the router. After the reboot, things will return to the original state: handshake from the phone works, but access to the network fails.
Thanks for shedding light on this!
The setup:
I have a MT router running Wireguard in my home network. The wireguard1 interface IP is 192.168.255.1.
Then I have 2 devices in road warrior mode: a Linux laptop and an Android phone.
The laptop's Wireguard IP is 192.168.255.4.
The phone's Wireguard IP is 192.168.255.3.
Both devices have 192.168.2.0/24 (my home network) and 192.168.255.1/32 in Allowed IPs.
On the router, in the Peers settings, I have:
- the laptop Peer has 192.168.255.4 in Allowed Address
- the phone Peer has 192.168.255.3 in Allowed Address
With these settings:
The laptop is able to handshake and access my network without any problem.
The phone is able only to handshake. It cannot access any IP inside my network.
I found a way to fix this though: on the router, in the phone Peer settings, I can add 0.0.0.0/0 (or the actual IP that the phone has at that moment) into its Allowed Address - then I am able to access my network from the phone as well.
The question: why is this additional Allowed IP needed for the phone? The laptop works without it just fine.
What is even more interesting: when I "fix" the problem this way and establish the tunnel from the phone, I can then safely remove the additional Allowed IP on the router in the phone Peer settings and keep only 192.168.255.3 there. After this change, the phone will still be able to establish the tunnel AND access my network. All will be working fine until I reboot the router. After the reboot, things will return to the original state: handshake from the phone works, but access to the network fails.
Thanks for shedding light on this!