Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every time I reboot new Address #51

Closed
helio58 opened this issue Feb 2, 2019 · 19 comments
Closed

Every time I reboot new Address #51

helio58 opened this issue Feb 2, 2019 · 19 comments

Comments

@helio58
Copy link

helio58 commented Feb 2, 2019

Hi,
Every time I reboot the router getting a new address in my.zerotier.com
Is there a way to have it persistent ?
Thanks

@kbumsik
Copy link

kbumsik commented Feb 3, 2019

I'm having the exactly same issue now. It did not happen until recently.
After reboot, the zerotier-one client creates a new Zerotier address so Zerotier recognizes it a new device.
Everything else looks fine.

As a note, I use davidc502 build for WRT3200ACM router.

# uname -a
Linux OpenWrt 4.14.95 #0 SMP Thu Jan 24 21:54:13 2019 armv7l GNU/Linux

@helio58
Copy link
Author

helio58 commented Feb 3, 2019

I m using OpenWrt 18.06.1, r7258-5eb055306f , Linux OpenWrt 4.14.63 #0 Wed Aug 15 20:42:39 2018 mips GNU/Linux

@helio58
Copy link
Author

helio58 commented Feb 3, 2019

@kbumsik I think I have it working. Here is what I did.
/etc/init.d/zerotier stop
vi /etc/config/zerotier
in the config I add " option secret 'generate' "
save and
/etc/init.d/zerotier start
reboot
Now I got the same address. :)

@mwarning
Copy link
Owner

mwarning commented Feb 3, 2019

Hi,
" option secret 'generate' " creates a new key. But the magic value 'generate' was removed in recent openwrt packages. Now key generation is triggered by an empty/missing key.
You might be able to set the IP address and MAC address of the device by using /etc/config/network:

config interface
  option ifname 'zt0'
  list ipaddr '1.2.3.4'
  option mac '12:34:56:ab::cd:ef'

Not sure if this works. I haven't had time for this package lately.

@helio58
Copy link
Author

helio58 commented Feb 3, 2019

Thanks mwarning
I got it working .

@mwarning
Copy link
Owner

mwarning commented Feb 3, 2019

@helio58 did my config line above work?

@helio58
Copy link
Author

helio58 commented Feb 25, 2019

@mwarning Sorry miss your message. I did not use your line. Thanks

@mwarning
Copy link
Owner

ok, but what did you do to solve your issue?

@helio58
Copy link
Author

helio58 commented Feb 25, 2019

This was what i did
/etc/init.d/zerotier stop
vi /etc/config/zerotier
in the config I add " option secret 'generate' "
save and
/etc/init.d/zerotier start
reboot
Now I got the same address. :)

@mwarning
Copy link
Owner

hm, ok. that looks like the default configuration. (Although I removed the magic 'generate' value in the current version)

@helio58
Copy link
Author

helio58 commented Feb 25, 2019

@mwarning Update. Refresh the router install your package follow the wiki . Works now 100%
Thanks

@internetxhora
Copy link

Hi, in conclusion how can I fix this reboot issue on current openwrt version?
Thanks in advance.

@ogarcia
Copy link
Collaborator

ogarcia commented Jun 17, 2019

@internetxhora simply follow the wiki

@mwarning
Copy link
Owner

mwarning commented Jun 17, 2019

I do not think the wiki helps here.
@internetxhora is there a secret set in your /etc/config/zerotier?
Btw.: the mac address does not change for my device (I always use the public earth network).

@internetxhora
Copy link

internetxhora commented Jun 17, 2019 via email

@mwarning
Copy link
Owner

@internetxhora please to not use that generate special secret key. It was a bad idea. The startup script will generate a key and save it in /etc/config/zerotier if there was no secret set (or it is empty).
Btw., what zerotier version do you use?

@internetxhora
Copy link

1.2.8-2

@ogarcia
Copy link
Collaborator

ogarcia commented Jun 18, 2019

@internetxhora as say @mwarning simply remove the line option secret = 'generate' in /etc/config/zerotier. Next reboot your router and look again in /etc/config/zerotier, you must have a new secret line but with a long id, something like option secret '6b3a5d8678:0:verylooooongline. Make sure that you have this line in your config before login to zerotier and authorize. It's the unique way to determine that your node is always the same.

@internetxhora
Copy link

internetxhora commented Jun 18, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants