Skip to main content

2.0 Creating a Tailscale Connection


*PAT= placeholder name 

  1. Go to your Tailscale Admin Console
  2. Add new machine on user’s Tailscale

    • Add device > Linux Server

  3. Generate install script


  4. Copy and paste install script into user's Ubuntu Server VM (might have to manually type it out // all one line)
    EXAMPLE:
    
    curl -fsSL https://tailscale.com/install.sh | 
    sh && sudo tailscale up --auth-key=tskey-auth-kEc5KrwcPv11CNTRL-rsE7QpaFhNeKRnTdUALKJgbkJ2Vg
  5. Start up Tailscale in it:
    sudo tailscale up
  6. Open the given login link and sign into Tailscale
  7. Type in the following commands:

    Note - Change the advertise routes according to your subnet in a home lab environment

    Connect to Tailscale as a subnet router:echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.confecho 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.confsudo sysctl -p /etc/sysctl.confAdvertise subnet routes:sudo tailscale up --advertise-routes=192.168.1.0/24 
  8. Enable the configured route on Tailscale
    • Edit route settings > Check the box with the IP route > Save

  1. EXAMPLE:
    
    curl -fsSL https://tailscale.com/install.sh | 
    sh && sudo tailscale up --auth-key=tskey-auth-kEc5KrwcPv11CNTRL-rsE7QpaFhNeKRnTdUALKJgbkJ2Vg

    Generate install script


  1. Copy and paste install script into user’s Ubuntu Server VM (might have to manually type it out // all one line)

EXAMPLE:

curl -fsSL https://tailscale.com/install.sh | 
sh && sudo tailscale up --auth-key=tskey-auth-kEc5KrwcPv11CNTRL-rsE7QpaFhNeKRnTdUALKJgbkJ2Vg
  1. Start up Tailscale in it:

sudo tailscale up
  1. Open the given login link and sign into Tailscale

  2. Type in the following commands:

Connect to Tailscale as a subnet router:
echo '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

Advertise subnet routes:
sudo tailscale up --advertise-routes=192.168.1.0/24 (x.x.x.x/y)
  1. Enable the configured route on Tailscale

    • Edit route settings > Check the box with the IP route > Save

EXAMPLE: