type
Post
status
Published
date
May 21, 2025
slug
summary
Tailscale组网实战
tags
工具
category
技术分享
icon
password
Property
Jun 18, 2025 09:05 AM
注册
由于 Tailscale 是商业产品,因此需要在官网注册 https://tailscale.com/ (opens new window),其免费可提供最多 3 个用户 100 个设备(可使用自建服务器,解决限制问题)
- 在官网注册账号后,在每个设备安装 Tailscale 客户端,登录账号即可完成组网。
- Tailscale 客户端完成登录后,默认的 key 是会过期的,可按需进入 Tailscale 后台 (opens new 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
OpenWRT
opkg update # 安装iptables-nft【openwrt 20.3+需要】 opkg install iptables-nft kmod-ipt-conntrack kmod-ipt-conntrack-extra kmod-ipt-conntrack-label kmod-nft-nat # 安装tailscale opkg install tailscale # 查看openwrt版本; cat /etc/openwrt_release | grep DISTRIB_RELEASE # DISTRIB_RELEASE='24.10-SNAPSHOT'
开启出口
--exit-node=<exit-node-name-or-ip> --exit-node-allow-lan-access=true
增加中转
当 UDP 打洞失败时,,默认使用 Tailscale 官方 DERP Servers(中转服务器)转发流量,但 Tailscale 并未在中国大陆地区部署 DERP Servers,虽然在香港有一个,但似乎连不上,实测会使用 Tokyo 、 San Francisco 的 DERP Servers 进行中转,延迟约 200ms。
FAQ解答
- Author:wilson
- URL:https://wilsonmk.xyz/article/1a6e2d07-1fff-80b9-b301-ddbb11bb91b7
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts