ZeroTier
server安装
- Windows MSI Installer (x86/x64)
- MacOS MacOS PKG Installer
- command line
# Get your ZeroTier address and check the service status sudo zerotier-cli status # Join, leave, and list networks sudo zerotier-cli join ################ sudo zerotier-cli leave ################ 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" - Apple iOS App Store
- Android Google Play Store
- Linux (DEB/RPM)
- rely on SSL to authenticate the site
curl -s https://install.zerotier.com | sudo bash- have GPG installed
curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && \ if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi- Other Linux distributions building and installing from source
- FreeBSD FreeBSD Package
加入网络
type zerotier-cli join ################ with ############### being the 16-digit network ID of the network
启动和开机自启动
$ sudo systemctl start zerotier-one.service
$ sudo systemctl enable zerotier-one.service
problems:
- 提示
zerotier-cli: missing authentication token and authtoken.secret not found (or readable) in /var/lib/zerotier-one
解决chmod 755 /var/lib/zerotier-one/authtoken.secret - 每次join network都会新建新的网络端口, 增加网络数
解决 在计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles中删除ProfileName以"网络"开头的条目
管理员运行PowerShell
Get-ChildItem ’HKLM:\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\’ |
ForEach-Object{
$profilename = $_.GetValue('ProfileName')
if($profilename.StartsWith("网络 ")){
Write-Host "Removing item: $profilename" -ForegroundColor green
Remove-Item $_.PSPath -Whatif
}else{
Write-Host "Skipping item:$profilename" -Fore blue -Back white
}
}
端口转发
ssh
Squid
参考1, 2, 3
linux在/etc/squid.conf, mac在/usr/local/etc/squid.conf
将http_access deny all改为http_access allow all后, service squid restart
在代理中设置端口为3128即可(mac的命令是brew services restart squid)
# 启动
systemctl start squid.service
# 停止
systemctl stop squid.service
# 重启
systemctl restart squid.service
#设置开机自启
systemctl enable squid.service
VNC
- 服务相关
vncserver -kill :1#关掉某个窗口
vncserver :1#开启某个窗口
vncserver start
- 显示桌面
编辑~/.vnc/xstartup文件(ref)
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
#在最后添加
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &

本文详细介绍ZeroTier网络配置步骤,包括安装、网络管理、服务启动及常见问题解决方法。涵盖Windows、MacOS、Linux等多平台操作指南,以及端口转发、SSH、VNC等高级应用设置。
1423

被折叠的 条评论
为什么被折叠?



