-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
edit: I can reproduce without the upnp requirement. On mac: Just turn off wifi, start zerotier, turn wifi on.
Trying to figure out these issues https://github.com/zerotier/ZeroTierOne/issues?q=is%3Aopen+is%3Aissue+label%3ABoot%2FWake
They might not all be related.
To reproduce something similar -this is a pain- do this:
- have a firewall that requires nat-pmp or upnp for zerotier to connect. Block incoming/returning/established UDP but not outgoing UDP. block ipv6.
- make vm with bridged networking. i used debian 11
- log in through the vm interface, not ssh; we'll be breaking ip access to the vm.
- stop zerotier
systemctl stop zerotier-one - delete the ip address from the physical interface
ip addr del 192.168.1.x/24 dev enp0s5 - start zerotier
/var/lib/zerotier-one/zerotier-one - see "sendto: network is unreachable" message from upnp library
- add ip address back to physical interface
dhclient enp0s5 - ping 1.1.1.1 should work
- wait...
zerotier-cli info -jwill eventually show some surface addresses, but still no direct peers inpeers- eventually it'll start working
this does seem worse in 1.10.6 than 1.10.1. hard to be scientific because it takes a few minutes each test. I've seen like 40 second and 4 minutes and now 1.10.6 took 15 minutes.
Some of the issues listed below say 1.10.1 or 1.8.x is better, but it's hard to tell.
time (watch -g zerotier-cli peers | grep RELAY) so you don't have to stare at the terminal while it works.
This elaborate setup is an attempt to simulate zerotier-one starting before the computer has DHCP'd its physical addresses during boot. Could this be happening on wake from sleep too? Maybe dhcp changes your physical IP when you wake from sleep and then that confuses PortMapper too.