2.0 Creating a Tailscale Connection
Adding a Device
- Go to your Tailscale Admin Console
-
Add new machine on user’s Tailscale
- Add device > Linux Server
- Add device > Linux Server
- Generate install script
- Copy and paste install script into user's Ubuntu Server VM (might have to manually type it out if ssh isn't configured // all one continuous line)
EXAMPLE:
curl -fsSL https://tailscale.com/install.sh | sh && sudo tailscale up --auth-key=tskey-auth-kEc5KrwcPv11CNTRL-rsE7QpaFhNeKRnTdUALKJgbkJ2Vg - Start up Tailscale in it:
sudo tailscale up
- Open the given login link and sign into Tailscale
Configure Advertised Subnet Routes
- To connect to Tailscale as a subnet router, type in the following commands:
Note - Change the advertise routes according to your subnet in a home lab environment
*Any confusion on command syntax/structure can be clarified in Legendecho 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf sudo sysctl -p /etc/sysctl.conf
- To advertise subnet routes, type into the shell:
CIDR Notation uses a slash (/) and a number to indicate the length of the network prefix (e.g. 10.0.0.0/24)
sudo tailscale up --advertise-routes=[IP ADDRESS CIDR]
- Enable the configured route on Tailscale
- Edit route settings > Check the box with the IP route > Save
- Edit route settings > Check the box with the IP route > Save
IMAGE SHOWING WHERE TO EDIT ROUTE SETTINGS:
Last Updated: 2/22/2025
Contributors: Lilian, Vivian