# Tailscale

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="/files/DKsal3vizuZxJj9ndNhd" 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="/files/RV2fubr4BJE5xD85u0Dt" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/Bhny50rY0kQNT0axLhMM" 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://how.router.works/remote/vpn-tunnel/tailscale.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
