Closed diogotcorreia closed 2 months ago
Hi @diogotcorreia
time="2024-06-13T11:14:48Z" level=info msg="Handshake timed out" durationNs=22911866345 handshake="map[stage:1 style:ix_psk0]" initiatorIndex=42024764 localIndex=42024764 remoteIndex=0 udpAddrs="[[XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:e593]:58425 [XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:5e5c]:58425 94.XXX.XXX.XXX:58425 172.17.0.1:58425 192.168.1.2:58425]" vpnIp=192.168.100.2
This log line indicates that Nebula has sent handshakes to every host listed in udpAddrs
and received no replies.
If you look above the "error" log lines, you'll see the following:
time="2024-06-13T11:14:25Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=42024764 localIndex=42024764 remoteIndex=0 udpAddrs="[94.XXX.XXX.XXX:58425 172.17.0.1:58425 192.168.1.2:58425]" vpnIp=192.168.100.2
The errors regarding IPv6 addresses occur because you're on a network that doesn't support IPv6. When we try to "write" these packets, we receive an error, and log it. When writing the IPv4 packets, no such error occurs. These errors can be safely ignored. This may be addressed in a future version of Nebula / Mobile Nebula.
I have two lighthouses, 192.168.100.1 and 192.168.100.7. The latter has IPv6 connectivity while the former is IPv4-only.
Just FYI, it is advisiable to always use an IPv4 address in the static_host_map
for Lighthouses as it gives the Lighthouse a chance to learn the public IPv4 address for a node. (i.e. Most IPv4 networks are NAT'd, so a laptop/phone/server on the network doesn't know the public IPv4 address and can't self-report it to the Lighthouse. The lighthouse learns the address via the "source" part of the handshake packet.) I see you are already doing this.
I'll take a further look then. The truth is that I can't ping the host, nor does it show up under "Active Tunnels". 🤔
As for the lighthouse addresses, I'm using a host name that has both A and AAAA records (for 192.168.100.7).
This seems to be something with my ISP. I have two SIM cards in my phone, and it works fine in one of them but not in the other (neither have IPv6 connectivity).
My solution was to configure relay nodes in my Nebula network and now everything works.
Thanks again for your thorough explanation.
This seems to be something with my ISP. I have two SIM cards in my phone, and it works fine in one of them but not in the other (neither have IPv6 connectivity).
Most likely the ISP you have issues with uses a more difficult form of NAT for hole punching. Some carriers even use CGNAT, where multiple customers share a public IP address. These are nearly impossible to punch through, and relays are your best bet here. 👍
Logs:
I have two lighthouses, 192.168.100.1 and 192.168.100.7. The latter has IPv6 connectivity while the former is IPv4-only.
I'm trying to connect to 192.168.100.2 (Linux, with IPv6 connectivity), from an Android device 192.168.100.6 (without IPv4 connectivity).
It appears that the Nebula app is trying to do the handshake using only the two IPv6 addresses, and not the public IPv4 that is also known to the app (see last line of log).