Does GL-A1300 (Slate Plus) run as an exit node for Tailscale

Hi all,

So I was planing to travel for a bit and use a portable router to be able to use the hotspot for multiple devices, and also be able to connect to my home devices through a Tailscale tunnel. Will that be possible to do with a GL-A1300 (Slate Plus)?

Thanks
Vin

Not without a touch of work:

Hi @bring.fringe18 - Thatā€™s fine with me, Iā€™m cool with making any changes. I just donā€™t have a context for how to first authenticate with tailscale and then run the gl.inet router as the exit node. Does it have to be through GUI first? Is there a documentation page available for all that?

IDK; I donā€™t use TS. I only know that method is reported to work per the results of others. I assume youā€™re already set up your tailnet & are just looking to get the GL device to act as a exit node.

Hi @bring.fringe18 - Yeah I already have tailscale up and running. I just want to use the GL-A1300 as an exit node.

Then if that method I posted still works it should just be a matter of tweaking a script. Donā€™t forget to add that modified .sh to be including in your backups:

1 Like

Sure thing, Iā€™ll buy the device soon and will post the results of setting up tailscale here in this thread.

1 Like

Right so I was able to set up tailscale with persistent connection as an exit nde. Hereā€™s the steps.

  1. Enable tailscale in Applications and authenticate your machine.

  1. Ensure the router is the exit node and also disable the expiry of the authentication key.
    <Canā€™t insert more than 1 image>

  2. Edit the file /usr/bin/gl_tailscale.sh and add the highlighted parameter to the line 159 after the --reset parameter. The line should look like:
    /usr/sbin/tailscale up --reset --advertise-exit-node --accept-routes $param --timeout 3s > /dev/null

<Canā€™t insert more than 1 image>

  1. Restart the router and test if it works once itā€™s back up and running.

Thanks you @tragicshadow for the solution from here.

2 Likes

Heh; @tragicshadow 's method is just a reimplementation of mine updated for the Flint v2 (GL-MT6000) differences in firmware filenames. Itā€™s not quite as clean but hey! As long as it works.

@vin321 ā€¦ so youā€™re welcome. :wink:

(Donā€™t forget to mark ā€˜solutionā€™ to let others know when they search the forum. Have a good one!)

1 Like

I like the sed approach BUT tailscale.settings.exit_node_ip is not set on my server (as it should only be set on the client..). There doesn't seem to be a tailscale.settings that could be used for this purpose so just added a line just before the tailscale up command. This is the combination of the above two solutions:

sed '/timeout 10 \/usr\/sbin\/tailscale up/i\        # Custom param: add --advertise-exit-node on server\n        param="$param --advertise-exit-node"\n' /usr/bin/gl_tailscale >> \
 /usr/bin/gl_tailscale.new && mv /usr/bin/gl_tailscale /usr/bin/gl_tailscale.stock \
&& mv /usr/bin/gl_tailscale.new /usr/bin/gl_tailscale && chmod +x /usr/bin/gl_tailscale

yo the file to edit is /usr/bin/gl_tailscale - I can't seem to be able to update it where my solution is. So here it is:

Edit the file /usr/bin/gl_tailscale and add --advertise-exit-node right after the --reset parameter to wherever you find this line:

/usr/sbin/tailscale up --reset --advertise-exit-node --accept-routes $param --timeout 3s > /dev/null

I'll post the sed command a bit later.

1 Like

This worked perfectly vin321. Thanks.
I went into the apps panel and installed the nano text editor (I used nano_full since my MT6000 has plenty of space). Then ssh'd into the router (you have to enable it first).
nano /usr/bin/gl_tailscale
that'll open the file in nano, then the line vin321 mentioned is nearly at the end of the file for me.
add the option, save (write out), reboot, profit.

An alternative way of enabling the exit node mode without editing the start script or running frequent cron commands.

  1. Go to Lucy then System->Startup->Local startup
  2. Enter above the exit 0 line:
( sleep 60; tailscale set --advertise-exit-node ) &

This will allow the router to start all processes, including Tailscale connection and, after 60s, will set the flag --advertise-exit-node.

This solution persists after the router updates.