Skip to content

安装后配置 ​

安装完成后,需要将设备接入 Tailscale 网络。

基本设置 ​

简单使用:

sh
# 登录到 tailscale 网络
tailscale up

示例用法:

sh
# 登录到 tailscale 网络,自定义主机名、不使用 Tailscale DNS、通告子网路由、充当出口节点
tailscale up \
  --accept-dns=false \
  --advertise-routes=10.0.0.0/24 \
  --advertise-exit-node

更多配置用法: 请查看 OpenWrt 官方文档 或 Tailscale 官方文档

OpenWrt 22.03 用户

添加 --netfilter-mode=off 参数。OpenWrt 23+ 则不要包含此参数。

常用配置选项 ​

选项说明
--hostname=名称设置自定义主机名
--accept-dns=false不使用 Tailscale DNS
--advertise-routes=x.x.x.x/xx通告子网路由
--advertise-exit-node充当出口节点
--accept-routes接受其他设备通告的路由
--netfilter-mode=off禁用 netfilter(OpenWrt 22.03 必需)

启用开机自启 ​

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

检查状态 ​

sh
/etc/init.d/tailscale status
tailscale status
tailscale ip

更新 Tailscale ​

sh
# APK
apk update && apk upgrade tailscale

# OPKG
opkg update && opkg upgrade tailscale

也可以使用一键脚本更新(自动检测安装模式,过程带断线保护,适合 SSH/Tailscale 远程操作):

sh
sh install.sh --update --yes

卸载 ​

sh
/etc/init.d/tailscale stop
/etc/init.d/tailscale disable
# 对于 apk 包管理器
apk del tailscale  
# 对于opkg包管理器
opkg remove tailscale
rm -rf /etc/tailscale /var/lib/tailscale

TIP

如果 apk del / opkg remove 提示无法删除(被其他包依赖,例如 luci-app-tailscale-community),请先卸载依赖它的包再执行卸载。

下一步 ​

Built with ❤️ and shared with the community.