群晖NAS DSM7.2 启用ZeroTier(docker)

开启ssh登陆,并切换成root权限 sudo -i

创建tun.sh

1
echo -e '#!/bin/sh \ninsmod /lib/modules/tun.ko' > /usr/local/etc/rc.d/tun.sh

创建目录

1
mkdir -p /var/lib/zerotier-one

运行docker,自动下载最新版的zerotier-synology:latest

1
2
3
4
5
6
7
8
docker run -d \
  --name zt   \
  --restart=always \
  --device=/dev/net/tun \
  --net=host  \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_ADMIN \
  -v /var/lib/zerotier-one:/var/lib/zerotier-one zerotier/zerotier-synology:latest

查看docker中的zerotier状态

1
docker exec -it zt zerotier-cli status

加入网络

1
docker exec -it zt zerotier-cli join xxxxxxxxxxxxxxxxx

显示网络状态

1
docker exec -it zt zerotier-cli listnetworks
发表回复 0

Your email address will not be published. Required fields are marked *