1、安装脚本

curl -fsSL https://tailscale.com/install.sh | sh

2、开启转发

echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p

3、启动

tailscale up --advertise-routes=192.168.2.0/24 --advertise-exit-node