[The English version of the article was generated using AI]
Environment: Home Router LAN: 192.168.8.0/24, IP: 192.168. Environment: Home Router LAN: 192.168.8.0/24, IP: 192.168.8.1**
Dormitory Router LAN: 192.168. Dormitory Router LAN: 192.168.17.0/24, IP: 192.168.17.1 Preparations**
Site-to-site enables devices in two local area networks to access devices in other local area networks via LAN addresses without installing Tailscale.
Preparations
Some router systems have incompl "nft" in the software packages and install all that you can (I actually don't know which specific ones to install, hope experts can give advice).
Setting Subnet Routing (Execute on Both Routers)
First, let's talk about the idea: Enable subnet routing for each OpenWRT device -> Set static routes for OpenWRT devices.
Yes, the idea is that simple.
Install the software: CH3NGYZ/tailscale-openwrt: Tailscale on OpenWRT One-Click Deployment Script (github.com)
After installation, enter tailscale up
(the deployment script should prompt you to log in, and if you have logged in, there is no need for this step.)
Check whether your router devices are connected in the Tailscale console.
Enter the following command in the router SSH (replace 192.168.x.0/24
below with the LAN area address of your current router, f 192.168.8.0/24
, and the dormitor 192.168.17.0/24
):
Shell 复制
tailscale up --accept-routes --advertise-routes=192.168.8.0/24 --accept-dns=false
After entering, check the console to see if there is a subnet!
character under the device. Click on the right side ... and tick the box for your LAN area.
Interface Configuration
In OpenWRT, go to Network - Interfaces, click Add New Interface, set the name to tailscale0
, the protocol to Static Address, and select the device tailscale0
. Click OK, then edit the relevant information. Fill in the IPv4 address with the address allocated by Tailscale in the console (usually 100.xx.xx.xx
), and the subnet mask with 255.0.0.0
.
Set the firewall to the LAN area (you can also create a separate tailscale
area, the effect will be the same in the end).
No need to fill in anything else, just
Firewall Settings
If you have set up a separate firewall area for Tailscale, go to the area settings and add tailscale
to the allowed forwarding target areas. Also, add the allowance for forwarding from the tailscale
area.
(The image is only for demonstration, I set

Set both input and output forwarding to Accept.
Adding Static Routes
After both of your routers have set up subnet routing (the subnet routing IP addresses should not be the same and should be consistent with your actual IP addresses),
(on both routers) in OpenWRT, go to Network -> Routing -> Static IPv4 Routes and add the following:
The gateway is the address of the current router device, and the target is the address of the other local area network (the following image shows the dormitory router adding a route)

After saving, the interconnection will be enabled.
Tailscale also suggests adding a static route for a Tailscale address. I don't think it has much impact on my application scenario. If you need to add it, then add it as follows (fill in the same for both routers):

Comments | NOTHING