zbt WE3426 OpenWRT 安装zerotier
1 2 | [https://aisoa.cn/post-2525.html] [https://koolshare.cn/thread-152561-1-1.html] |
1、官网注册并新建Network ID.
2、在路由器上安装并激活ZeroTier
2-1、ssh进入路由器shell,运行
1 2 | opkg update opkg install zerotier |
报错如下:
1 2 3 4 5 6 | Installing zerotier (1.6.5-1) to root... Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/mipsel_24kc/packages/zerotier_1.6.5-1_mipsel_24kc.ipk Collected errors: * satisfy_dependencies_for: Cannot satisfy the following dependencies for zerotier: * kernel (= 4.14.274-1-f2594a51cfc04a523dcc4c7bd05d34bd) * opkg_install_cmd: Cannot install package zerotier. |
看了下内核信息
1 | opkg info kernel |
返回如下信息:
1 2 3 4 5 6 | Package: kernel Version: 4.14.180-1-e74476996c55e47dde62ef18be7fd7d8 Depends: libc Status: install user installed Architecture: mipsel_24kc Installed-Time: 1589298482 |
说明内核版本 kernel 4.14.180 太低,无法安装,就算加 –force-depends –force-overwrite 安装或 加 –nodeps 安装,虽然表面上安装成功,但后续问题非常多.
1 2 3 | opkg update opkg install zerotier --force-depends --force-overwrite //家里路由器用这代码安装成功 opkg install zerotier --nodeps //公司路由器用这代码安装成功 |
返回信息:
1 | Package zerotier (1.6.4-1) installed in root is up to date. |
2-3. 修改配置文件
1 | vi /etc/config/zerotier |
默认信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | option enabled 1 # persistent configuration folder (for ZT controller mode) #option config_path '/etc/zerotier' #option port '9993' # path to the local.conf #option local_conf '/etc/zerotier.conf' # Generate secret on first start option secret '' # Join a public network called Earth list join 'c7c8172af117fa16' #list join '<other_network>' |
修改两个地方
1 2 | option enabled 0 改为 option enabled 1 list join '8056c2e21c000001' 改为 list join 'c7c8172af117fa16' |
2-4. 启动zerotier
1 | /etc/init.d/zerotier start |
返回如下信息说明已经启动成功
1 2 3 | root@WaimaoRouterST2:~# /etc/init.d/zerotier start Generate secret - please wait... root@WaimaoRouterST2:~# |
2-5. 加入moon
1 2 | zerotier-cli join c7c8172af117fa16 zerotier-cli orbit d5d04c0cca d5d04c0cca |
返回如下信息说明已经成功
1 | 200 orbit OK |
2-6. 显示网络
1 | zerotier-cli listpeers |
返回如下信息说明已经成功
1 2 3 4 5 6 7 | 200 listpeers <ztaddr> <path> <latency> <version> <role> 200 listpeers 61d294b9cb 50.7.73.34/9993;4546;9316 286 - PLANET 200 listpeers 62f865ae71 50.7.252.138/9993;4546;44868 74 - PLANET 200 listpeers 778cde7190 103.195.103.66/9993;14659;34460 370 - PLANET 200 listpeers 992fcf1db7 195.181.173.159/9993;14660;54771 287 - PLANET 200 listpeers c7c8172af1 35.235.97.247/37023;14661;18067 193 1.6.4 LEAF 200 listpeers ecc3ed36ec - -1 - LEAF |
2-7. 重启报错
1 2 | killall zerotier-one zerotier-one -d |
重启报错如下信息
1 | unable to configure virtual network port: could not open TUN/TAP device: No such file or directory |
三. 以上这个问题是因为 zerotier 依赖包跟 这个版本的OpenWRT 版本 不匹配.
3-1. 还原固件 waimaorouterst2.bin ,再安装一下 zerotier.发现安装有问题.
3-2. 升级固件.发现已经是最新版本,升级不了
3-3. 恢复出厂.
3-4. 发现还是安装不了.算了,不折腾了。还是去买个工控机.