Zerotier One finally run on WSL2

Hi,

I was trying to install Zerotier One under my Debian, and finally got it work.

It may work for other distros.

Here is the list of steps I did:

  1. Update, Update and Update Windows
    Make sure it is up to date!

  2. Install Debian with WSL2. It WON’T work with WSL version 1.

Distro Installation

wsl --set-default-version 2
wsl --install -d debian

Verify version

wsl -l -v
  NAME          STATE           VERSION
* Debian        Running         2

Try to make both wsl and linux distro up to date

wsl.exe --update

Debian

sudo apt update
sudo apt upgrade
  1. Once Debian is up and running, enable systemd support. This is critical step to make it work.

Create /etc/wsl.conf, with the following 2 lines

[boot]
systemd=true

Save and reboot ws distribution.

wsl.exe --shutdown

Once done, check to make sure systemd is working.

systemctl list-unit-files --type=service
  1. Now, go ahead with the zerotier installation
    Follow the instruction here Download – ZeroTier
curl -s https://install.zerotier.com | sudo bash

This should complete without any issues.

$ sudo zerotier-cli info
200 info 900000000 1.10.5 ONLINE

$ sudo zerotier-cli peers
200 peers
<ztaddr>   <ver>  <role> <lat> <link>   <lastTX> <lastRX> <path>
62f8650000 -      PLANET   250 DIRECT   33146    107977   50.1.1.1/9993
778cde0000 -      PLANET    44 DIRECT   791      791      103.1.1.1/9993
b6baf80000 -      LEAF      -1 RELAY
bae19f0000 1.10.3 LEAF      -1 RELAY
cafe040000 -      PLANET    99 DIRECT   33147    108129   84.1.1.1/9993
cafe9e0000 -      PLANET    84 DIRECT   33147    108144   104.1.1.1/9993
d3ecf50000 1.10.6 LEAF      30 DIRECT   13106    13076    35.1.1.1/57608

$ sudo zerotier-cli listnetworks
200 listnetworks <nwid> <name> <mac> <status> <type> <dev> <ZT assigned ips>
200 listnetworks xxxxxxxxxxxxxxxx Home xx:xx:xx:xx:xx:xx OK PRIVATE xxxxxxxxxx 192.168.0.0/24

I now can run SSH over the zerotier IP and connect remotely via another zerotier client.

Hope this helps,
Bao

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.