软件准备
1、使用uname -a查看openwrt处理器版本(本文以arm64为例)
2、前往https://pkgs.tailscale.com/stable/#static复制对应的通用包链接
安装过程
下载安装包
cd /tmp
wget https://pkgs.tailscale.com/stable/tailscale_1.92.3_arm64.tgz解压安装包
tar -zxvf tailscale_1.92.3_arm64.tgz安装软件
cp tailscale_1.92.3_arm64/tailscale /usr/sbin
cp tailscale_1.92.3_arm64/tailscaled /usr/sbin
chmod +x /usr/sbin/tailscale
chmod +x /usr/sbin/tailscaled编辑启动项
#!/bin/sh /etc/rc.common
# Copyright 2020 Google LLC.
# Copyright (C) 2021 CZ.NIC z.s.p.o. (https://www.nic.cz/)
# SPDX-License-Identifier: Apache-2.0
USE_PROCD=1
START=80
start_service() {
local state_file
local port
local std_err std_out
config_load tailscale
config_get_bool std_out "settings" log_stdout 1
config_get_bool std_err "settings" log_stderr 1
config_get port "settings" port 41641
config_get state_file "settings" state_file /etc/tailscale/tailscaled.state
config_get fw_mode "settings" fw_mode nftables
/usr/sbin/tailscaled --cleanup
procd_open_instance
procd_set_param command /usr/sbin/tailscaled \
--state=/var/lib/tailscale/tailscaled.state \
--socket=/var/run/tailscale/tailscaled.sock
# Starting with v1.48.1 ENV variable is required to enable use of iptables / nftables.
# Use nftables by default - can be changed to 'iptables' in tailscale config
procd_set_param env TS_DEBUG_FIREWALL_MODE="$fw_mode"
# Set the port to listen on for incoming VPN packets.
# Remote nodes will automatically be informed about the new port number,
# but you might want to configure this in order to set external firewall
# settings.
procd_append_param command --port "$port"
procd_append_param command --state "$state_file"
procd_set_param respawn
procd_set_param stdout "$std_out"
procd_set_param stderr "$std_err"
procd_close_instance
}
stop_service() {
/usr/sbin/tailscaled --cleanup
}
开机自启
/etc/init.d/tailscale enable启动tailscale
/etc/init.d/tailscale start关闭tailscale
/etc/init.d/tailscale stop