Tailscale

From NixOS Wiki
Revision as of 14:44, 2 December 2022 by imported>Telotortium (Initial page stub)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

From Official Website

Tailscale makes networking easy

Tailscale lets you easily manage access to private resources, quickly SSH into devices on your network, and work securely from anywhere in the world.

Basic setup

Configuring TLS

Per Enabling HTTPS in the Tailscale documentation, run the following:

$ sudo tailscale cert ${MACHINE_NAME}.${TAILNET_NAME}

Running multiple Tailnet-accessible services on a single machine

The essence is to run multiple tailscaled daemons on a machine, with the additional daemons using userspace networking rather than tun, which seems to intercept connections to all Tailscale IPs on a machine. Basically for an additional service MYSERVICE run the following commands:

$ STATE_DIRECTORY=/var/lib/tailscale/tailscaled-tt_rss
$ sudo mkdir -p ${STATE_DIRECTORY}
$ sudo env STATE_DIRECTORY=${STATE_DIRECTORY} tailscaled --statedir=${STATE_DIRECTORY} --socket=${STATE_DIRECTORY}/tailscaled.sock --port=0 --tun=user
$ sudo tailscale --socket=${STATE_DIRECTORY}/tailscaled.sock up --auth-key=tskey-key-MYSERVICE_KEY_FROM_TAILSCALE_ADMIN_CONSOLE --hostname=MYSERVICE --reset