docs: 新增 LXC 部署注意事項、節點對照表、symlink 設定
記錄 Proxmox LXC 環境需使用 --tun=userspace-networking 的解法、 TS_USERSPACE 環境變數在新版失效的坑,以及 /usr/local/bin 的 symlink 設定。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,38 @@
|
||||
|
||||
`./tailscale` 是 `docker exec -i tailscale tailscale` 的包裝腳本。
|
||||
|
||||
部署後建議建立 symlink 讓系統全域可用:
|
||||
|
||||
```bash
|
||||
ln -sf /opt/tailscale/tailscale /usr/local/bin/tailscale
|
||||
```
|
||||
|
||||
之後即可在任何路徑直接執行 `tailscale status` 等指令。
|
||||
|
||||
## Proxmox LXC 部署注意事項
|
||||
|
||||
LXC 容器環境下 `/dev/net/tun` 不存在且無法用 `mknod` 建立,tailscaled 會啟動失敗。
|
||||
|
||||
**解法:** 使用 userspace networking 模式:
|
||||
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
command: >
|
||||
sh -c "tailscaled --tun=userspace-networking"
|
||||
```
|
||||
|
||||
並移除 volumes 中的 `/dev/net/tun:/dev/net/tun` 掛載。
|
||||
|
||||
**注意:**
|
||||
- `TS_USERSPACE=true` 環境變數在新版 Tailscale(v1.96+)無效,必須直接傳 `--tun=userspace-networking` 參數
|
||||
- userspace networking 模式**不支援** `--advertise-routes` 和 `--advertise-exit-node`,該節點無法作為子網路由器或出口節點
|
||||
|
||||
## 節點部署對照表
|
||||
|
||||
| 主機 | 類型 | Tailscale IP | 主機名稱 | 備註 |
|
||||
|------|------|-------------|---------|------|
|
||||
| 192.168.42.126 | Proxmox LXC | 100.64.0.8 | ip-192-168-42-126 | userspace networking,無路由/出口功能 |
|
||||
|
||||
## 防火牆與路由設定
|
||||
|
||||
在主機上執行:
|
||||
|
||||
Reference in New Issue
Block a user