From df82e403fa12fb67c5a5d77d7e807197715fc17a Mon Sep 17 00:00:00 2001 From: admins Date: Sat, 13 Dec 2025 23:27:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20tailscale/tailscale-instal?= =?UTF-8?q?l.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tailscale/tailscale-install.md | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/tailscale/tailscale-install.md b/tailscale/tailscale-install.md index 0d5f15d..70c33e7 100644 --- a/tailscale/tailscale-install.md +++ b/tailscale/tailscale-install.md @@ -142,4 +142,50 @@ logtail: enabled: false randomize_client_port: false +``` + +### 创建用户 +``` +headscale user create cba +``` +### 查看用户 + +``` +# headscale user list +ID | Name | Username | Email | Created +1 | | cba | | 2025-12-11 14:11:53 +2 | | abc | | 2025-12-13 12:23:02 +``` + +### linux cli 配置 +``` +wget https://pkgs.tailscale.com/stable/tailscale_1.22.2_amd64.tgz +tar zxvf tailscale_1.22.2_amd64.tgz + +cp tailscale_1.22.2_amd64/tailscaled /usr/sbin/tailscaled +cp tailscale_1.22.2_amd64/tailscale /usr/bin/tailscale + +cp tailscale_1.22.2_amd64/systemd/tailscaled.service /lib/systemd/system/tailscaled.service +cp tailscale_1.22.2_amd64/systemd/tailscaled.defaults /etc/default/tailscaled +``` +``` +systemctl enable --now tailscaled +systemctl status tailscaled +``` +#### Tailscale 接入 Headscale: +``` +## 如果你是在自己的服务器上部署的,请将 换成你的 Headscale 公网 IP 或域名 + + tailscale up --login-server=http://47.106.140.17:8080 --accept-routes=true --accept-dns=false + + + 将其中的命令复制粘贴到 headscale 所在机器的终端中,并将 USERNAME 替换为前面所创建的 user。 +``` +#### 注册成功,查看注册的节点: +``` +# headscale nodes list +ID | Hostname | Name | MachineKey | NodeKey | User | IP addresses | Ephemeral | Last seen | Expiration | Connected | Expired +1 | localhost | localhost | [ZqdSj] | [qxtoU] | cba | 100.64.0.1, fd7a:115c:a1e0::1 | false | 2025-12-13 15:03:06 | 0001-01-01 00:00:00 | offline | no +2 | smb-kk | smb-kk | [6+OpS] | [ZOUQN] | abc | 100.64.0.2, fd7a:115c:a1e0::2 | false | 2025-12-13 14:42:15 | 0001-01-01 00:00:00 | online | no + ``` \ No newline at end of file