ZeroTier SD

  • I recently got a mini host for the office, thinking it would be convenient to configure an environment and have occasional access at home. I temporarily deployed internal network penetration using frp – specifying port forwarding, which requires a public server with a connection quality dependent on its bandwidth. Instead, I experimented with a fresh Zerotier virtual LAN, similar to a VPN, where I created a virtual network card locally, and all machines joined into that virtual network.

What is ZeroTier

ZeroTier is a software-defined wide area network (SD-WAN) solution that allows users to create secure virtual networks between devices in different geographic locations. Through ZeroTier, you can easily connect multiple computers, servers, and devices into a virtual, encrypted network – as if they were on the same local network. This can help programmers and IT professionals securely share data and resources across different locations without complex network setups and VPN configurations.

  1. ZeroTier Networks: A ZeroTier Network is a virtual, global LAN that allows different devices to connect together over the internet, as if they were on the same physical network. This network can contain multiple subnets, with all devices connected together using ZeroTier technology. Planet Server: The Planet Server is a key component of the Zerotier network. It’s global in scope, responsible for maintaining and managing the entire Zerotier network’s topology, routing information, and network state. The Planet Server acts as a central control center for the network, but does not directly transmit data. User devices need to connect to at least one Planet Server to participate in the Zerotier network.

What is Zerotier

  1. Relay Server: A relay server is an auxiliary node within the Zerotier network, used to help devices establish direct communication channels. When devices cannot connect directly, they can use a relay server to transmit data. This helps improve network reachability and performance. Relay servers are typically located around the globe, acting as data transmission hubs.

In essence, Zerotier utilizes the assistance of planet servers and relay servers to enable devices to create virtual local networks globally, facilitating secure and fast communication between devices. The planet server is responsible for global network management, while the relay server helps establish connection links when needed.

Installation & Deployment

  1. Visit the ZeroTier official website (https://www.zerotier.com/) to obtain installation files and documentation.
  2. Download and install the ZeroTier One client according to your operating system. It supports Windows, macOS, Linux, and many other platforms.
  3. Launch the ZeroTier One client after installation.
  4. Register a ZeroTier account if you don’t already have one. You can create an account within the client.
  5. Log in with your ZeroTier account and create a new network. The network will have a unique 16-character ID, which you need to remember.
  6. Join this network on your device. You can either enter the network ID in the client or use the QR code scanning feature.
  7. Devices with the installed and configured ZeroTier client will be added to the same virtual network.

Installation and Deployment of Moon

Many domestic operators have banned UDP tunneling, and the frp service is stable due to using the TCP protocol. Zerotier deployment can also achieve similar effects by deploying a relay server, requiring firewall opening of UDP port 9993.

Verify installation success Join the local network Create moon Edit the configuration file, adjust the stableEndpoints nodes to “server public IP/9993” Generate signature configurations, create the moons.d folder, and move the previous files into it; restart the service.

Client nodes join the moon server, taking the ID from the JSON configuration file’s id field.

  • On Windows platforms, launch the terminal with administrator privileges and operate using the zerotier-cli.bat command-line tool.
  • On Linux platforms, operate using the zerotier-cli tool.
  • Use the peers subcommand to view connections, and listpeers to view all nodes. Normal display of the moon node indicates successful joining.

Uninstalling

How to uninstall on the Windows platform is beyond the scope of this document, as it follows standard operating procedures – typically through the Control Panel. We will focus on Ubuntu.

  1. Remove the zerotier-one service using dpkg.
  2. Delete the zerotier-one folder, which stores the address information; deleting it will result in a new address being generated upon reinstallation.

Epilogue

They were originally all decommissioned, arriving at the server location without suitable service nodes to act as proxy servers. Alibaba was focused on sales and provided development trial servers with low configurations, costing only 99 yuan per year and used for two years. The key factor was the bandwidth offered by the servers.

References

A financial IT programmer's tinkering and daily life musings
Built with Hugo
Theme Stack designed by Jimmy