Headscale MGMT
概述
参考:
最佳实践
tailscale 默认网段与阿里云 DNS 网段冲突
https://nyan.im/p/troubleshoot-tailscale
本质:tailscale 使用 100.64.0.0/10 网段,阿里云 DNS 100.100.2.138。阿里云的 DNS 地址刚好被规则丢了。
解决方式:
- 治标
- 删除 ts-input 链中
-A ts-input -s 100.64.0.0/10 ! -i tailscale0 -j DROP这条规则
- 删除 ts-input 链中
- 治本
- 暂无
修改节点 IP
[!Tip]
https://github.com/juanfont/headscale/issues/3133 未合并。现阶段只能通过修改 Sqlite 实现。
查看各节点 IP
sqlite3 -header -column /var/lib/headscale/db.sqlite "SELECT id, hostname, given_name, ipv4, ipv6 FROM nodes;"
id hostname ipv4 ipv6
-- ---------------- ---------- -----------------
1 LAPTOP-5113MLDP 100.64.0.1 fd7a:115c:a1e0::1
2 aliyun-ubuntu-01 100.64.0.2 fd7a:115c:a1e0::2
更新 1 和 2 节点的 ipv4
sqlite3 -header -column /var/lib/headscale/db.sqlite "UPDATE nodes SET ipv4='100.64.0.2' WHERE id=1;"
sqlite3 -header -column /var/lib/headscale/db.sqlite "UPDATE nodes SET ipv4='100.64.0.1' WHERE id=2;"
反馈
此页是否对你有帮助?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.