I tried adding the tailscale up command to the http://192.168.10.1/cgi-bin/luci/admin/system/startup page but it didnāt work. I have to run the command manually after a reboot.
LuCIās Startup is just a frontend for /etc/rc.local. Make sure your command string is above the exit 0 & the string itself ends with & to send it into the background processes.
Iāll give that a go but not sure why it needs to be pushed to the background? Itās a one shot command that should re-enable the routes and exit node. It would be much better if there was an advanced option in the UI to enable other Tailscale config.
I asked the same of my ddns client when Iām benind addnāl upstream routers:
root@GL-AX1800:~# cat /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
. /lib/functions/gl_util.sh
remount_ubifs
/usr/lib/ddns/dynamic_dns_updater.sh -S desec_ipv4 start &
exit 0
You run the risk of it choking in rc.local & inadvertently stalling the full boot process. If itās a true āone shotā as you describe itāll exit fr the bg processes automatically anyways.
Do you know the file location for the conf? It can be checked for its existence & if so, deleted/moved/renamed/whatever before launching w/ your specific string.
My Flint is running f/w 4.2.3-release5. Try adding some custom params to the launching shell script. You might not even need rc.local:
root@GL-AX1800:~# cat /etc/init.d/tailscale
#!/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
/usr/sbin/tailscaled --cleanup
config_get enabled "settings" enabled 0
if [ "$enabled" -eq "1" ];then
procd_open_instance
procd_set_param command /usr/sbin/tailscaled
# 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"
# my custom params
procd_append_param command --advertise-routes "192.168.10.0/23"
# ... & so on, & so forth....
# // end my custom params
procd_set_param respawn
procd_set_param stdout "$std_out"
procd_set_param stderr "$std_err"
procd_close_instance
fi
}
That wont work unfortunatelyā¦ The init.d file runs tailscaled not tailscale - there is no --advertise-routes etc for the daemon process. The tailscale binary is the cli interface to the tailscale daemon process.
Itāll add more the launch string of /usr/bin/gl_tailscale @ this if statement/code block:
if [ -n "$exit_node_ip" ];then
param="$param --exit-node-allow-lan-access --exit-node=$exit_node_ip"
# new params added here by the `sed` search & replace
fi
You can add your params there or by adding more to the second half of that above sed command.
I hadnāt realised /usr/bin/gl_tailscale was a script! I assumed it was a binary - Iāll check out what you have posted above but this will definitely fix things for me.