mwarning / zerotier-openwrt

A OpenWrt package for ZeroTier One - Pull requests are welcome!
695 stars 146 forks source link

Every time I reboot new Address #51

Closed helio58 closed 5 years ago

helio58 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

Thanks mwarning I got it working .

mwarning commented 5 years ago

@helio58 did my config line above work?

helio58 commented 5 years ago

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

mwarning commented 5 years ago

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

helio58 commented 5 years ago

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 commented 5 years ago

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

helio58 commented 5 years ago

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

internetxhora commented 5 years ago

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

ogarcia commented 5 years ago

@internetxhora simply follow the wiki

mwarning commented 5 years ago

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 commented 5 years ago

Yes I´m using secret = ´generate´, but everytime gl-ar750 router reboots, it gets a new ip so I have to login to zerotier and authorize it.

Enviado desde Correohttps://go.microsoft.com/fwlink/?LinkId=550986 para Windows 10


De: Moritz Warning notifications@github.com Enviado: Monday, June 17, 2019 6:05:23 AM Para: mwarning/zerotier-openwrt CC: internetxhora; Mention Asunto: Re: [mwarning/zerotier-openwrt] Every time I reboot new Address (#51)

I do not think the wiki helps here. @internetxhorahttps://github.com/internetxhora is there a secret set in your /etc/config/zerotier?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mwarning/zerotier-openwrt/issues/51?email_source=notifications&email_token=AML32DWXLXKTDYW2DQZKCWLP25VXHA5CNFSM4GT6NMOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX22JCA#issuecomment-502637704, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AML32DSEG3WU6TBLEWVFEWDP25VXHANCNFSM4GT6NMOA.

mwarning commented 5 years ago

@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 commented 5 years ago

1.2.8-2

ogarcia commented 5 years ago

@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 commented 5 years ago

Thank you very much, that fixed the problem.

Enviado desde Correohttps://go.microsoft.com/fwlink/?LinkId=550986 para Windows 10


De: Óscar García Amor notifications@github.com Enviado: Tuesday, June 18, 2019 2:16:51 AM Para: mwarning/zerotier-openwrt CC: internetxhora; Mention Asunto: Re: [mwarning/zerotier-openwrt] Every time I reboot new Address (#51)

@internetxhorahttps://github.com/internetxhora as say @mwarninghttps://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mwarning/zerotier-openwrt/issues/51?email_source=notifications&email_token=AML32DVTSKE47CA63XWDPA3P3CDWHA5CNFSM4GT6NMOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX5NW5Q#issuecomment-502979446, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AML32DSEGYVY4TYZXHZZRL3P3CDWHANCNFSM4GT6NMOA.