[go: up one dir, main page]

DEV Community

Kyle Parisi
Kyle Parisi

Posted on

A Secret Tool I Use Daily

The Best Tool Is One You Don't Think About

Every computer and server I use, I install zerotier on. What is zerotier? It's virtual networking, or software based networking. I originally thought the idea was neat but either a. the software would fail me or b. the company would fizzle out. I've been using zerotier for years and neither of those situations have happened.

How it works

Zerotier uses UDP, with a TCP fallback, and creates a virtual network device on your computer. It establishes a network through zerotier root servers to get both a private IPv4 and IPv6 addresses per network. Alternatively you can join a public zerotier network such as their "Earth" network which is open to anyone to join. Once connected, you get encrypted peer to peer connections. Here is what it looks like to jump from my work computer to my home server:

traceroute

You would think I needed to configure a million files to get this to work, à la a vpn server. Not the case.

# after installing zerotier, using earth network ID here:
zerotier join 8056c2e21c000001

Once you join, you can login to zerotier and allow this new host on the network.

That's it! Straight magic after that.

So how do I use it

I use it to ssh into my different computers. Often times I'll have some code on my a computer that I forgot to push. I can also maintain my home server and restrict certain web interfaces based on my zerotier IP address. The ease of use totally negates the need for a complicated VPN setup. I've been so impressed with zerotier that I'm the maintainer of the Alpine Linux zerotier package. They even have a mobile app if you're into always being connected.

Give it a shot. The free tier is very reasonable.

Top comments (4)

Collapse
 
radio_azureus profile image
Radio Azureus

I just learned about zerotier about 36hrs ago. I'm fascinated by the posibilities and am about to test it out with iScsi, for which I will make a test setup on a notebook system

Collapse
 
kyleparisi profile image
Kyle Parisi

It's really good. One of the more fun activities I did was do a p2p stream of my cat from my house directly to my office computer so I could show people. I even redirected the stream from my work computer to a coworker's computer so they could monitor him haha.

Collapse
 
githubber64 profile image
Shane Cooke

Hi Kyle, I just discovered ZT and am mystified about how things, once connected, actually communicate. Could you explain how you did a P2P stream please? I had expected that ZT would have some kind of auto-discovery for services, but, there don't seem to be any services included, just the secure connection. Thanks!

Thread Thread
 
kyleparisi profile image
Kyle Parisi

Sure thing. My home computer and work computer were both allowed on the same zerotier network. I did this manually via the zerotier dashboard. Each computer will get an ipv4 address for this network. I used VLC to capture and stream my webcam to my works zerotier address. Once I got to work, I opened VLC to play from a network ip address:port. To get the redirection to work I think I used VLC on my work computer to point to another office computer which just used VLC to play the stream.

Auto-discovery and DNS are not usually things that just work. I think this is because it's a software defined network interface (just guessing). Most things will work if you are explicit about it like file sharing, video streaming, etc. For DNS I bought a meaningless name and just manually set the zerotier ips.