起源
没有公网IP,不在同一个路由器,没法远程连接电脑或者服务器。之前一直使用 zerotier, 但是这次使用 Truenas scale 安装 zerotier, 每次重启都变化IP,一直没解决。转投 tailscale。
注册
Outlook邮箱注册 -> 下载台式机软件,安装 -> Tailscale 网页账户登录 -> Setting -> Keys
这个Key在Truenas scale上需要用
Truenas scale 安装 Tailscale
2024年7月22号,只需要配置 Auth Key 和 勾选 Host Network,即可网页访问 WebUI 以及 windows 通过 tailscale IP 实现 SMB 共享。
参考 Jeff’s Computer Service 的 Youtube How to Setup remote access for (TrueNAS Scale) using tailscale。
Apps -> Available Applications 中间搜索 Tailscale,我安装的是 Truenas community 版本
修改设置
注意勾选 Host Network
Tailscale 配置
查看IP
登录Tailscale查看设备,一个是电脑的,一个是Truenas的。
右边三个点,使秘钥不过期,enable key expiry。
修改IP
Tailscale IP 可选范围:100.64.0.0 to 100.127.255.255
More specifically, we assign addresses in the 100.64.0.0/10 subnet (from 100.64.0.0 to 100.127.255.255). This is called the “Carrier Grade NAT” (CGNAT) address space, reserved by RFC6598, IANA-Reserved IPv4 Prefix for Shared Address Space.
修改路由
测试
Windows Ping
Windows 文件访问
后续
重启 Truenas scale 后,IP没有改变,任然可以访问
注意
我是 NAS 连接自己路由器,Windows 的 WIFI 连接路由器,然后Windows有线连接一个外网。Tailscale 客户端必须关闭 “UseTailscale subnets”, 否则 Windows 上 ping 不通 路由器地址,登不上 Truenas scale 的 WebUI 。