0%

群晖 Synology 安装 ZeroTier

前言

最近购买了一台蜗牛星际矿难机器,自己安装了黑群晖,记录一下群晖安装 ZeroTier 远程访问的过程。

正文

下载安装包

在 ZeroTier 官网下载群晖专用安装包:https://download.zerotier.com/dist/synology/

请根据自己的电脑 CPU 选择相应的安装包,蜗牛星际 C 款是:zerotier-1.2.12r1-syn-x64-6.1.spk

请安装解决了重启不能自启 bug 的最新版

安装 ZeroTier

进入群晖的套件中心,选择手动安装进行安装。

加入 ZeroTier 网络

在套件中心打开安装好后的 ZeroTier,计入已经创建好的 ZeroTier 网络。ZeroTier 网络的创建请参考:P2P 内网穿透工具 ZeroTier

修复开机自启 BUG

重启后 ZeroTier 的虚拟网卡不能够加载成功,外届无法连通 群晖,只能群晖连接 ZeroTier 网络用户中的其他用户。

进入群晖的 Shell 环境运行下列命令:

1
2
3
4
5
cat <<EOF > /usr/local/etc/rc.d/tun.sh
#!/bin/sh -e

insmod /lib/modules/tun.ko
EOF

修改文件运行权限:

1
chmod a+x /usr/local/etc/rc.d/tun.sh

根据 https://github.com/zerotier/ZeroTierNAS/issues/28 最新版(1.4.0)已经解决了重启不能启动的 BUG。

Hey everyone, my apologies for taking so long on this. Here’s an updated set of packages to preview 1.4.0. It addresses the following issues:

  • Losing interface on reboot: insmod /lib/modules/tun.ko issued upon each reboot (and start of the service). See tickets #41 and #43
  • Identity files moved to more traditional location /var/lib/zerotier-one, and are now preserved across uninstalls, reinstalls, updates, etc. Prior to this version, during uninstall we were intentionally deleting your identity files just for thoroughness but this seems to be annoying to most users (rightly so). So uninstalling and updating to this version is the last time that your configuration will get wiped. See tickets #41
  • Service script now sends proper SIGKILL signal
  • Segfault on ARM (might be fixed), see ticket #52
  • Memory leak (might be fixed), see ticket #46

To view logs for this package, see: /var/log/packages/zerotier.log

参考

  1. Synology Nas’es lose virtual interface address after reboot.
  2. Fix TUN/TAP not available on a Synology NAS

欢迎关注我的其它发布渠道