I came across ZeroTier a few years back but had never played with it until recently. It turns out to be really cool. It allows you to create a virtual network and connect any devices you have.
For my use case, I have a small home-lab and a Synology NAS which are on my private network. I want to access these from outside of my home, but I don’t want to expose them to the public.
My first attempt at this was to open a firewall rule to expose a VPN so I could connect to my home network from the outside world. This works okay, but dealing with internet provider internet gateways (I’m looking at you AT&T) is a horrible experience. Previously I’ve had full passthrough mode, but the current modem/router provided by AT&T has rather limited functionality.
I’ve tried many variations of this, including things as extreme as Pritunl Zero to expose services. But truth be told, all of these tend to be somewhat of a pain.
ZeroTier lets you create a network on its ZeroTier portal. You’ll get a network id which is a random string of characters. With this id you can then run:
zerotier-cli join <network id>
Once you’ve joined the network, go back to the portal and enable the device you just connected. An IP will be assigned to your device which will be accessible to any other device in the network.
So no matter where in the world you are, as long as you are connected to that network, you can talk to your other devices. Now I can connect to my internally-hosted applications from anywhere on my phone or laptop. Incredible!