Skip to content

Tailscale

Install and configure the Tailscale client to establish a secure mesh network and manage node connectivity.



  1. Terminal window
    curl -fsSL https://tailscale.com/install.sh | sh
  2. Optimizations for subnet routers and exit nodes (optional)

    Section titled “Optimizations for subnet routers and exit nodes (optional)”

    Enable IP forwarding and adjust network interface offloading to maximize throughput for routed traffic.

    Terminal window
    NETDEV=$(ip -o route get 1.1.1.1 | cut -f 5 -d " ")
    sudo ethtool -K $NETDEV rx-udp-gro-forwarding on rx-gro-list off
    Terminal window
    printf '#!/bin/sh
    ethtool -K %s rx-udp-gro-forwarding on rx-gro-list off
    ' "$(ip -o route get 1.1.1.1 | cut -f 5 -d " ")" | sudo tee /etc/networkd-dispatcher/routable.d/50-tailscale
    sudo chmod 755 /etc/networkd-dispatcher/routable.d/50-tailscale
    Terminal window
    echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
    echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
    sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
  3. Terminal window
    sudo tailscale up --advertise-routes={{SUBNET_VAR}} --accept-dns=false --advertise-exit-node --accept-routes=false
    • Go to https://login.tailscale.com/admin/machines.
    • Approve exit node and subnet routes for your device.
    • Go to DNS > Nameservers.
    • Add Nameserver: Select Custom.
    • IP address: Enter your Tailscale IP (100.x.y.z).
    • Override Local DNS: toggle to ON.