[新软件] 虚拟建网zerotier (synology+ios+android+mac+linux+windows)
date
Jan 21, 2024
slug
newsoftware-zerotier-mutli-systems
status
Published
summary
新软件 zerotier
tags
software
type
Post
URL
Summary安装过程zerotier.com 注册一个新的<network id>, 可以配置router,比如 10.0.0.x 通过 192.168.191.19 来routeSynology - 重启persistmacwindowsiosunbuntu, linux参考https://muzihuaner.github.io/2021/09/22/内网穿透神器ZeroTier使用教程/


Summary


安装过程
zerotier.com 注册一个新的<network id>, 可以配置router,比如 10.0.0.x 通过 192.168.191.19 来route

Synology - 重启persist
ssh user@local-synology-ip
sudo -i
# check for TUN
ls /dev/net/tun
# 如果显示/dev/net/tun则已经开启,以下不用
# if not, turn on TUN
echo -e '#!/bin/sh -e \ninsmod /lib/modules/tun.ko' > /usr/local/etc/rc.d/tun.sh
chmod a+x /usr/local/etc/rc.d/tun.sh
/usr/local/etc/rc.d/tun.sh
# install docker / container manager
# start
mkdir /var/lib/zerotier-one
# command 1
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
# command 2
docker exec -it zt zerotier-cli join <your-network-id-check-bitw-like-e5cd7a9e1cae134f>
# Authorize the NAS on your network https://my.zerotier.com/
# Then check network status
docker exec -it zt zerotier-cli listnetworks
# enter docker
docker exec -it zt bash
# upgrade
docker rm -f zt
docker pull zerotier/zerotier-synology:latest
# then rerun command 1 & 2

mac
# from https://www.zerotier.com/download/ or
brew install --cask zerotier-one
# To stop/start the ZeroTier system service, open Terminal.app and paste these commands:
# Stop
sudo launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist
# Start
sudo launchctl load /Library/LaunchDaemons/com.zerotier.one.plist
### or
# 启动
$ zerotier-cli info
# 获取地址和服务状态
$ zerotier-cli status
# 加入、离开、列出网络
$ zerotier-cli join # Network ID
# need to approve in web
$ zerotier-cli leave # Network ID
$ zerotier-cli listnetworks

windows
winget install ZeroTier.ZeroTierOne
ios


unbuntu, linux
参考
https://muzihuaner.github.io/2021/09/22/内网穿透神器ZeroTier使用教程/
