Skills2026年4月15日·1 分钟阅读

ZeroTier — Programmable Layer-2 Overlay Network

Open-source SD-WAN that builds encrypted peer-to-peer Layer-2 overlays spanning NATs, clouds, and edge devices with a rule engine and controller API.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
ZeroTier
先审查命令
npx -y tokrepo@latest install ceb43612-38d6-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

TL;DR
ZeroTier creates encrypted peer-to-peer Layer-2 overlay networks that traverse NATs and connect any device, cloud, or edge node.
§01

What it is

ZeroTier is an open-source software-defined networking tool that creates encrypted peer-to-peer Layer-2 overlay networks. It connects devices across NATs, firewalls, clouds, and on-premises infrastructure as if they were on the same local network. A controller API and flow rule engine let you define network policies programmatically.

ZeroTier is for teams that need to connect servers, containers, IoT devices, or developer machines across different networks without traditional VPNs or complex firewall rules.

§02

How it saves time or tokens

ZeroTier eliminates VPN server setup and maintenance. Instead of configuring WireGuard or OpenVPN servers, punching firewall holes, and managing certificates, you install ZeroTier on each device and join a network ID. Peer-to-peer connectivity is automatic, even behind double-NAT.

The controller API means network changes are programmable. Add or remove members, change IP assignments, or update flow rules via REST API calls instead of manual configuration.

§03

How to use

  1. Install ZeroTier:
# Linux / macOS
curl -s https://install.zerotier.com | sudo bash

# Or via package managers
brew install zerotier-one       # macOS
apt install zerotier-one        # Debian/Ubuntu
  1. Create a network at my.zerotier.com or run a self-hosted controller.
  1. Join the network on each device:
sudo zerotier-cli join <network-id>
§04

Example

Using the ZeroTier API to manage a network programmatically:

# List network members
curl -s -H 'Authorization: token YOUR_API_TOKEN' \
  'https://api.zerotier.com/api/v1/network/NETWORK_ID/member'

# Authorize a new member
curl -X POST \
  -H 'Authorization: token YOUR_API_TOKEN' \
  -d '{"config": {"authorized": true}}' \
  'https://api.zerotier.com/api/v1/network/NETWORK_ID/member/MEMBER_ID'

Once authorized, the device gets a virtual IP and can communicate with all other members as if on the same LAN.

§05

Related on TokRepo

§06

Common pitfalls

  • Leaving networks in public mode (auto-authorize). Any device that knows the network ID can join. Always use private networks and manually authorize members.
  • Ignoring flow rules. ZeroTier defaults to allow-all traffic between members. Define rules to restrict access between roles (e.g., only allow SSH from admin devices).
  • Expecting ZeroTier to replace a firewall. ZeroTier handles connectivity, not host-level security. Still run iptables or nftables on each device.

常见问题

How is ZeroTier different from WireGuard?+

WireGuard is a point-to-point VPN protocol that requires manual peer configuration and a central server for routing. ZeroTier is a full mesh overlay network where peers discover and connect to each other automatically, even behind NATs. ZeroTier also provides a controller for centralized policy management.

Can I self-host the ZeroTier controller?+

Yes. The ZeroTier controller is included in the zerotier-one package. You can run your own controller for full control over network management without using the hosted service at my.zerotier.com.

Does ZeroTier work behind corporate firewalls?+

Usually yes. ZeroTier uses UDP hole punching and falls back to relay servers (called roots) when direct connectivity is not possible. Most corporate firewalls allow outbound UDP traffic, which is sufficient for ZeroTier to establish connections.

Is ZeroTier free for small teams?+

Yes. The free tier supports up to 25 devices per network. Paid plans remove device limits and add features like business SSO, central management, and priority support.

What Layer does ZeroTier operate on?+

ZeroTier operates at Layer 2 (Ethernet). This means it can carry any protocol that runs on Ethernet, including IPv4, IPv6, and multicast traffic. Devices on a ZeroTier network behave as if connected to the same physical switch.

引用来源 (3)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产