ZeroTier
In RouterOS v7+, you can configure ZeroTier in ZeroTier menu, or use terminal with command /zerotier
ZeroTier is different from traditional VPNs - it creates a software-defined network where all devices appear to be on the same LAN, regardless of their physical location.
ZeroTier concepts
How ZeroTier works
Network model:
Creates virtual Ethernet networks (like VLANs but global)
Each device gets a ZeroTier address (like a MAC address)
Devices communicate directly when possible (P2P)
Falls back to relay servers when direct connection isn't possible
Key components:
Network ID - Unique identifier for your virtual network (16-character hex)
Node ID - Unique identifier for each device (10-character hex)
Controllers - Manage network membership and configuration
Roots - ZeroTier's infrastructure servers for coordination
Advantages over traditional VPN
Benefits:
True mesh networking - All devices can communicate with each other
Automatic NAT traversal - Works behind firewalls and NAT
No central server required - Devices connect directly when possible
Easy management - Web-based network controller
Cross-platform - Works on virtually any device
Scalable - Networks can grow to thousands of devices
Prerequisites
Before setting up ZeroTier on RouterOS:
RouterOS v7.1+ - ZeroTier support was added in version 7.1
Internet connectivity - Required for initial network join and coordination
ZeroTier account - Sign up at https://my.zerotier.com
Network created - Create a network in ZeroTier Central
ZeroTier Central setup
Create ZeroTier account and network
Sign up at https://my.zerotier.com
Create new network:
Click "Create A Network"
Note the Network ID (16-character hex string)
Configure network settings:
Name - Give your network a descriptive name
Access Control - Set to "Private" (recommended)
IPv4 Auto-Assign - Enable and configure IP range
IPv6 Auto-Assign - Enable if needed
Network configuration in ZeroTier Central
Basic settings:
Network Name - "Company Network" or similar
Description - Brief description of network purpose
Access Control - Private (devices must be authorized)
Certificate - Auto-generated, shows network is valid
IP assignment:
IPv4 Auto-Assign Pool - e.g., 192.168.192.0/24
IPv6 Auto-Assign - Enable if using IPv6
Managed Routes - Routes to advertise to network members
RouterOS ZeroTier configuration
Install and enable ZeroTier
Check connection status
Authorize device in ZeroTier Central
After joining the network:
Go to ZeroTier Central - https://my.zerotier.com
Select your network - Click on the network you created
Find your RouterOS device - Look for new device in "Members" section
Authorize device - Check the "Auth?" checkbox
Assign IP - ZeroTier will auto-assign IP, or set manually
Set name - Give device a descriptive name
Interface configuration
Configure ZeroTier interface IP
The ZeroTier interface acts like a regular network interface:
Bridge ZeroTier with local network
To allow ZeroTier devices to access local network:
Routing configuration
Basic routing for ZeroTier
Site-to-site connectivity
Configure RouterOS to route local networks over ZeroTier:
Router A (Site A - 192.168.1.0/24):
Router B (Site B - 192.168.2.0/24):
Firewall configuration
Allow ZeroTier traffic
NAT configuration (if needed)
If ZeroTier devices need internet access through RouterOS:
Advanced ZeroTier configuration
Multiple ZeroTier networks
RouterOS can join multiple ZeroTier networks:
Custom ZeroTier controller
For enterprise use, you can run your own ZeroTier controller:
ZeroTier network segmentation
Use VLANs with ZeroTier for network segmentation:
Monitoring and management
Check ZeroTier status
Network troubleshooting
ZeroTier Central management
From ZeroTier Central web interface:
View network topology - See all connected devices
Manage device authorization - Approve/deny devices
Configure IP assignments - Set static IPs for devices
Set up managed routes - Define network routing
Monitor network activity - View connection statistics
Use cases and scenarios
Remote office connectivity
Scenario: Connect branch offices to main office
Configuration:
Main office router joins ZeroTier network
Branch office routers join same network
Configure managed routes in ZeroTier Central
Set up local routing on each router
Remote worker access
Scenario: Allow remote workers to access office resources
Setup:
Office router joins company ZeroTier network
Remote workers install ZeroTier client and join network
Configure firewall rules to allow appropriate access
Set up DNS for internal resource resolution
IoT device management
Scenario: Securely manage IoT devices across locations
Implementation:
Create dedicated IoT ZeroTier network
Configure IoT devices to join ZeroTier network
Set up management server on ZeroTier network
Implement network segmentation for security
Security considerations
Network access control
Network segmentation
Monitoring and logging
Performance optimization
Optimize ZeroTier performance
Network optimization tips
Direct connections - Ensure devices can establish direct P2P connections
Firewall configuration - Allow UDP 9993 for optimal performance
Geographic placement - Consider ZeroTier root server locations
Network sizing - Keep networks under 100 devices for best performance
Route optimization - Use managed routes efficiently
Troubleshooting common issues
Connection problems
ZeroTier not connecting:
Check internet connectivity
Verify UDP 9993 is allowed through firewall
Confirm network ID is correct
Check device authorization in ZeroTier Central
Poor performance:
Check if direct P2P connection is established
Monitor for relay usage (indicates NAT/firewall issues)
Test network latency and packet loss
Consider ZeroTier root server proximity
Network access issues
Can't reach other devices:
Verify IP assignments in ZeroTier Central
Check managed routes configuration
Test basic connectivity with ping
Review local firewall rules
Intermittent connectivity:
Check for NAT session timeouts
Monitor ZeroTier peer connection status
Verify network stability
Check for IP address conflicts
Diagnostic commands
Last updated
Was this helpful?