0. 安装key
curl -fsSL https://pkgs.tailscale.com/stable/debian/bullseye.noarmor.gpg | tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null curl -fsSL https://pkgs.tailscale.com/stable/debian/bullseye.tailscale-keyring.list | tee /etc/apt/sources.list.d/tailscale.list 或者 curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | tee /etc/apt/sources.list.d/tailscale.list
1. 安装Tailscale
# apt update # apt install tailscale
2. 注册并连接
tailscale up --login-server=http://headscale.softs.im:8080 --accept-routes=true --accept-dns=false
它会生成一个key并 通知healscale
https://headscale.softs.im/register/nodekey:1fd6a7cb0b68ce395465d2d5720c531d8c0fd7f2345f9ab71ee0b37463408024
在headscale机器上,进行确认
headscale -n softeam nodes register --key nodekey:1fd6a7cb0b68ce395465d2d5720c531d8c0fd7f2345f9ab71ee0b37463408024
确认后, 注册命令会自动成功, 因为它每秒都在向 tailscale进行查询
3. 断开
tailscale down
4. 注销
tailscale logout
5. 通过主机名 查到对方的IP
tailscale ip peer_hostname
如果不提供hostname, 就是查自己的IP
6. ping 对方结点
tailscale ping hostname-or-ip
7.查看网络报告
tailscale netcheck
8. 查看连接状态
tailscale status fd7a:115c:a1e0::1 voice voiceteam linux - fd7a:115c:a1e0::2 racknerd voiceteam linux active; direct [2001:2002:2003:2004::9999]:41641, tx 9288 rx 7896
可以看出来, 到racknerd是通过IPV6直连的