Dr. Xiao-Le Deng

Ubuntu配置ZeroTier

2020-11-13 17:30
#Linux #Skills

1. 简介

ZeroTier的思路是:建立自己的局域网,到哪里都是局域网。

2. 步骤

1.官网注册账户: https://www.zerotier.com/ ,免费的账户允许接入100台设备,足够组网。

2.官网上配置ZeroTier,关键是记住NetworkID号。

3.Ubuntu安装ZeroTier

curl -s https://install.zerotier.com | sudo bash

4.加入到组建的局域网

sudo zerotier-cli join <NetworkID>

5.回到ZeroTier网站的管理界面给设备auth并找到对应设备的ManagedIPs,并查阅Ubuntu的Address命令

sudo zerotier-cli status

6.其他在局域网的设备进入此Ubuntu系统:

ssh name@ManagedIPs

3. Mac的常用命令

# Get your ZeroTier address and check the service status
sudo zerotier-cli status

# Join, leave, and list networks
sudo zerotier-cli join <NetworkID>
sudo zerotier-cli leave <NetworkID>
sudo zerotier-cli listnetworks

# Stop and start the service with launchctl
sudo launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist
sudo launchctl load /Library/LaunchDaemons/com.zerotier.one.plist

# Cleanly uninstall ZeroTier One, preserving only your secret identity
sudo "/Library/Application Support/ZeroTier/One/uninstall.sh"

4. 参考