> For the complete documentation index, see [llms.txt](https://how.router.works/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://how.router.works/remote/vpn-tunnel/tailscale.md).

# Tailscale

Tailscale is a VPN solution that provides seamless connectivity between devices across different networks without the need for public IP addresses or complicated firewall rules.

By joining a Tailscale network, your router can function as a subnet router, enabling remote access to local resources or securely connecting multiple subnets.

## Example of Setting Tailscale

Navigate to the router menu: SYSTEM > Terminal. Enter the username root and log in with the password you set.

### 1. Install Tailscale

All commands are executed in the SYSTEM >Terminal section of the router menu.

```
opkg update
opkg install tailscale
```

### 2. Enable the ZeroTier

Enable and start the Tailscale service.

```
/etc/init.d/tailscale enable
/etc/init.d/tailscale start
```

### 3. **Authenticate and Join Network**

Use this command to authenticate your device:

```
tailscale up
```

This command will generate a URL. Open the URL in your browser and log in with your Tailscale account to authorize the device.

<figure><img src="https://3846242597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNX0lpv92wMW1lNVYR0rx%2Fuploads%2FDuW9IdZv5LbF3fUOaBCg%2Fimage.png?alt=media&amp;token=4f096a86-716e-482a-9517-3757a494fac1" alt=""><figcaption></figcaption></figure>

### 4. **Configure as Subnet Router (Optional)**

If you need to expose the local subnet through Tailscale, use:

```
tailscale up --advertise-routers=192.168.30.0/24 --accept-dns=false
```

Replace `192.168.30.0/24` with your local subnet.

Prevent Tailscale's DNS Settings from disrupting your local network.

### 5. Enable Subnet Routes in Admin Console

* Visit the [Tailscale Admin Console](https://login.tailscale.com/admin).
* Go to **Machines**, locate your router device, and turn on the **Subnet routes** option.

<div align="left"><figure><img src="https://3846242597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNX0lpv92wMW1lNVYR0rx%2Fuploads%2FlNeuzH1yfnBhCYPSgsXo%2Fimage.png?alt=media&amp;token=7f83622d-527b-48b5-ad63-9e166bffc99d" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3846242597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNX0lpv92wMW1lNVYR0rx%2Fuploads%2Fu3fJ2vzsi9W0T8HZoHYm%2Fimage.png?alt=media&amp;token=28513caf-5118-4793-87e9-cffcc655ec60" alt="" width="305"><figcaption></figcaption></figure></div>

After completing the above settings, we can connect the remote device to the router and to the devices connected to it.
