Tailscale Setup revisions

Go back to topic: Tailscale Setup

  1. v12 anchor; v12 full version
  2. v11 anchor; v11 full version
  3. v10 anchor; v10 full version
  4. v9 anchor; v9 full version
  5. v8 anchor; v8 full version
  6. v7 anchor; v7 full version
  7. v6 anchor; v6 full version
  8. v5 anchor; v5 full version
  9. v4 anchor; v4 full version
  10. v3 anchor; v3 full version
  11. v2 anchor; v2 full version

Revision #12

Edited on
2024-10-08
Edited by user
qubalker
sudo mkdir -p /rw/bind-dirs/etc/default/tailscaled
├── etc │ └── default │ └── tailscaled
P.S: Instead of modifying `rc.local`, you can enable the service in the template with `sudo systemctl enable tailscaled`. In fact, it is enabled by default, so this step is excessive.

Revision #11

Edited on
2024-10-08
Edited by user
qubalker

Revision #10

Edited on
2024-04-21
Edited by user
kenosen
<b>You are now done and have a working sys-tailscale that you can use as the net vm for any qube you want to give access to your tailnet.</b> <b><em>Previous Version Starts here</b></em> <b>Note:</b> If you seek to enhance your privacy, you may also wish to consider a <a href="/doc/configuration/vpn.md">VPN proxy Qube</a>. <a href="https://tailscale.com/">Tailscale</a> is a mesh private network that lets you easily manage access to private resources, quickly SSH into devices on your network, and work securely from anywhere in the world. If you have devices in your private home network or at work at which you cannot use a VPN, Tailscale is a simple alternative with minimal setup. ## Template VM In a `t-tailscale` template VM, install tailscale with the simple sh script, then stop the service: ``` curl -fsSL https://tailscale.com/install.sh | sh systemctl stop tailscaled ``` ## AppVM In your `tailscale` AppVM, use your favorite editor to sudo edit '/rw/config/rc.local', adding the following lines at the bottom of the file: ``` sudo systemctl start tailscaled sudo tailscale up ``` Now make sure folder /rw/config/qubes-bind-dirs.d exists. ``` sudo mkdir -p /rw/config/qubes-bind-dirs.d ``` Create a file /rw/config/qubes-bind-dirs.d/50_user.conf with root rights. Edit the file 50_user.conf to append a folder or file name to the binds variable. ``` binds+=( '/var/lib/tailscale' ) ``` Save. Reboot the app qube. Done. From now on any files within the /var/lib/tailscale folder will persist across reboots. Shutdown and reboot the VM. Enter a console and run `sudo tailscale up` again to get the Tailscale tunnel link to your VM. <b>You are now done and have a working sys-tailscale that you can use as the net vm for any qube you want to give access to your tailnet.</b>

Revision #9

Edited on
2024-04-21
Edited by user
kenosen

Revision #8

Edited on
2024-04-20
Edited by user
Captain_Unicorn
Updating this to correct a few things, and also to not encourage a single command for fetching a script and running it without checking it first. I will leave the original authors on here in case it still works for a previous version of qubes. The way I am adding works for 4.2.1 <b>Create template and install Tailscale: </b> Create a new template VM to install tailscale into, I will be using a Fedora-39 template as the base for the new template. Inside that new template, we will follow the directions on the [Tailscale website](https://tailscale.com/kb/1050/install-fedora) with some modifications, the link is there for if you'd like to verify. ``` sudo dnf config-manager --add-repo https://pkgs.tailscale.com/stable/fedora/tailscale.repo sudo dnf install tailscale sudo systemctl stop tailscale ``` It will ask you to verify Tailscale's signing key fingerprint before it installs, which will look like this: ``` Importing GPG key 0x957F5868: Userid : "Tailscale Inc. (Package repository signing key) <info@tailscale.com>" Fingerprint: 2596 A99E AAB3 3821 893C 0A79 458C A832 957F 5868 From : https://pkgs.tailscale.com/stable/fedora/repo.gpg Is this ok [y/N]: ``` Confirm that fingerprint is correct and respond y. Frustratingly they don't post that on their website, but web of trust it and search around to make sure it is accurate. <b> Set up sys-tailscale: </b> Now create an app-vm based on your new tailscale template you just made. Make sure you check the box for provides network to other qubes. I called mine sys-tailscale. Start up a terminal for sys-tailscale and set up your bind-dirs to have the login persist across reboots: ``` sudo mkdir -p /rw/config/qubes-bind-dirs.d sudo nano /rw/config/qubes-bind-dirs.d/50_user.conf ``` Yes, I know, nano, get over it, it works well lol. Within 50_user.conf add the following: ``` binds+=( '/var/lib/tailscale' '/var/cache/tailscale' '/var/log/tailscale' '/etc/default/tailscaled' ) ``` Now time to finish setting up your [binds](https://www.qubes-os.org/doc/bind-dirs/#how-to-use-bind-dirssh). In order to do that we need to create those directories we added to 50_user.conf ``` sudo mkdir -p /rw/bind-dirs/var/lib/tailscale sudo mkdir -p /rw/bind-dirs/var/cache/tailscale sudo mkdir -p /rw/bind-dirs/var/log/tailscale sudo mkdir -p /rw/bind-dirs/etc/default/tailscaled ``` Now lets check to make sure we got it right: ``` [user@tailscale-checker ~]$ tree /rw/bind-dirs/ /rw/bind-dirs/ ├── etc │ └── default │ └── tailscaled └── var ├── cache │ └── tailscale ├── lib │ └── tailscale └── log └── tailscale ``` <b>Set up the commands we need in rc.local to have Tailscale set up and running on reboot</b> ``` sudo nano /rw/config/rc.local ``` Add the following two lines at the bottom of the file ``` systemctl start tailscaled tailscale up ``` You do not need to use add sudo on there on the commands in rc.local. I reboot sys-tailscale at this point, probably not necessary I just like to verify everything is there before logging in. <b>Log in to Tailscale</b> ``` sudo tailscale up ``` It will now prompt you to login in to a link it provides. Do that, then once you have logged in make sure to activate the machine in your Tailscale admin console Check to make sure you are logged in: ``` tailscale status ``` If you are logged in you should see the list of your machines running Tailscale starting with their IPs. Now time to reboot again and make sure your login persisted. Once rebooted just run tailscale status again, and if all went well you will still be logged in. <b>You are now done and have a working sys-tailscale that you can use as the net vm for any qube you want to give access to your tailnet.</b> <b><em>Previous Version Starts here</b></em>

Revision #7

Edited on
2024-04-20
Edited by user
Captain_Unicorn

Revision #6

Edited on
2023-12-11
Edited by user
michael
-curl -fsSL https://tailscale.com/install.sh | sh curl -fsSL https://tailscale.com/install.sh | sh

Revision #5

Edited on
2023-08-14
Edited by user
deeplow

Revision #4

Edited on
2023-06-03
Edited by user
deeplow

Revision #3

Edited on
2023-06-02
Edited by user
taradiddles

Revision #2

Edited on
2023-06-02
Edited by user
taradiddles