Connect your Mac, Linux machines, and remote VPS servers into a single private network using WireGuard mesh. Access any machine from anywhere, as if they were on the same local network.
What You'll Build
🍎
MacBook
10.77.0.10
↔
🔐
WireGuard Mesh
10.77.0.0/16
↔
🐧
Linux Server
10.77.0.20
🏠
Home Server
10.77.0.30
↔
☁️
VPS
10.77.0.40
↔
🗄️
Database
10.77.0.50
All machines can reach each other directly via mesh IP addresses
Download WireGuard from the App Store for a graphical interface. The CLI tools are still recommended for wgmesh.
💡 Note: On macOS, WireGuard creates a utun interface. You may need to approve the network extension in System Preferences → Security & Privacy.
Ubuntu/Debian# Update and installsudo apt updatesudo apt install -y wireguard wireguard-tools# Load the kernel modulesudo modprobe wireguard# Verifywg --versionip link add dev test0 type wireguard 2>/dev/null && echo "OK" && ip link del test0
wgmesh -deploy# SSHs to each node, installs WireGuard, configures mesh
Step 4: Expose Local Networks
Make your home/office network accessible from anywhere through the mesh.
MacBook (remote)
10.77.0.10
→
WireGuard Mesh
→
Home Server
10.77.0.30
→
192.168.1.0/24
Home LAN
On the gateway node (e.g., home server):
# Join with route advertisementsudo wgmesh join \
--secret "wgmesh://v1/YOUR-SECRET" \
--advertise-routes "192.168.1.0/24"
# Enable IP forwarding (Linux)echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/99-wireguard.confsudo sysctl -p /etc/sysctl.d/99-wireguard.conf
On macOS gateway:
# Enable IP forwarding (requires restart)sudo sysctl -w net.inet.ip.forwarding=1# Make permanentecho "net.inet.ip.forwarding=1" | sudo tee -a /etc/sysctl.conf
Access from any mesh node:
# Now you can reach home LAN devicesping 192.168.1.50ssh user@192.168.1.100curl http://192.168.1.200:8080
Common Use Cases
🏠 Remote Home Access
Access your home network from anywhere. Reach your NAS, smart home, or development servers without opening ports.
# From coffee shopssh 192.168.1.100# Direct to home server!
🔐 Secure Development
Connect to staging databases, Redis, or internal APIs as if they were local.
# Connect to staging DBpsql -h 10.77.0.50 -U app# Redis via meshredis-cli -h 10.77.0.51
☁️ Multi-Cloud Networking
Connect VPS instances across different providers into one network.
# Vultr + Hetzner + DO# All in 10.77.0.0/16curl http://10.77.0.40/api
🔄 CI/CD Self-Hosted
Let GitHub Actions runners access internal services securely.
# Runner in mesh can reach# internal deployment targetsssh deploy@10.77.0.30