Install ZeroTier on Kali Linux

Kali Linux is not one of the officially supported distros by the ZeroTier installer script, so if you just try to use it you will get an error message along the lines of:

FAILED: unrecognized or ancient distribution: kali-rolling

Kali Linux is based on Debian testing, so we can just “trick” the ZeroTier install script into thinking it’s Debian and it installs just fine:

# save /etc/debian-version
# (which will be something like kali-rolling)
DV_SAVE=$(cat /etc/debian_version)
# pretend we're Debian buster
echo buster | sudo tee /etc/debian_version >/dev/null
# follow ZeroTier install instructions from:
# https://www.zerotier.com/download/
# for example, if you don't care about checking gpg signatures:
curl -s https://install.zerotier.com | sudo bash
# restore /etc/debian-version
echo $DV_SAVE | sudo tee /etc/debian_version >/dev/null