Skip to main content

Command Palette

Search for a command to run...

Tailscale and Subnet Router: Installation and Configuration Guide

Updated
2 min read
Tailscale and Subnet Router: Installation and Configuration Guide

Installing Tailscale on Ubuntu and setting it up to advertise an IP or subnet (acting as a Subnet Router) is a common method to access LAN devices that can't run Tailscale on their own.

1. Install Tailscale

The most reliable way to install on Ubuntu is using the official one-line script:

Bash

curl -fsSL https://tailscale.com/install.sh | sh

2. Enable IP Forwarding

To advertise routes, your Ubuntu machine must be able to forward network traffic. Run these commands to enable it permanently:

Bash

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

3. Advertise the Routes

Now, bring Tailscale up and tell it which local IP ranges you want to share with your Tailscale network (your "tailnet"). Replace the example IP with your actual local network range (e.g., 192.168.1.0/24).

Bash

sudo tailscale up --advertise-routes=192.168.1.0/24
  • To advertise as an Exit Node: If you want this machine to route all internet traffic for other devices, use --advertise-exit-node instead.

4. Approve the Routes in the Admin Console

For security, Tailscale won't start routing traffic until you manually approve it in the dashboard:

  1. Open the Tailscale Admin Console.

  2. Locate your Ubuntu machine and click the three dots (...) menu.

  3. Select Edit route settings.

  4. Under Subnet routes, check the box for the routes you just advertised.

  5. Click Save.

5. Verify the Connection

On another device connected to your Tailscale network, try to ping a device on that local 192.168.1.x subnet. It should now be reachable as if you were physically on that network.