What's new

Tailscale on Asus RT-AX86U router

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I recently checked for and updated amtm Entware packages, and was surprised to see tailscale amongst them, which duly updated (to 1.58.1, which is not quite the latest stable track 1.60.0 per https://pkgs.tailscale.com/stable/#static). Can I assume this tailscale update under amtm is actually because of my own implementation of it as discussed in this thread and not because amtm now has it built in?

In any case it seems to have stopped my tailscale implementation working, so I think I will need to go through the above procedure again. I rebooted the router but it did not connect to tailscale again.

@RandomUser777 - have you seen this issue when updating amtm Entware packages, if you have done that?

@thelonelycoder - I appreciate you do not (currently :)) support this install of Tailscale, but as amtm (appears to update it, albeit not the latest stable version), I thought I would ask if there is a way to exclude the tailscale update from the Entware packages update please and also stop it from modifying /opt/etc/init.d/S06tailscaled?

Thanks a lot !

k.

EDIT: it seems the amtm package update only reset /opt/etc/init.d/S06tailscaled, so I redid that file as above and rebooted and seem to have tailscale back with the latest version, which I grabbed from https://pkgs.tailscale.com/stable/#static and copied across.
I also updated via entware, and noticed the same thing. A quick (re)edit of ./S06tailscaled fixed it for me too.
 
I also updated via entware, and noticed the same thing. A quick (re)edit of ./S06tailscaled fixed it for me too.
Great thanks for the confirmation, appreciated.
 
download updated binaries from tailscale's website (I used "tailscale_1.54.0_arm64.tgz")

extract, copy and overwrite them to /opt/bin/ (I used WinSCP). Make sure they have the same permissions as the originals (executable, etc)
Hi

Coming to you @RandomUser777 (or anyone else) for a bit of help because I think I stuffed up my install trying to update it this way (above) rather than issung "tailscale update" from the CLI.

Copying the two files, one (tailscale) copies and the other (tailscaled) throws an error about a text file being busy.

I tried "tailscale down" from the CLI (no go) and I tried to revert to the previous version (no go) and I tried rebooting the router (no go).
Before I redo the whole thing, is there a simple way to get the updated "tailscaled" file to copy across (preferably in WinSCP) please?

ta

k.

[EDIT1]

I think I found a way to do it, I went into the S06tailscaled file located in:

/opt/etc/init.d/

and commented out these two lines:

#PROCS=tailscaled
#ARGS="-tun=userspace-networking -statedir /mnt/DIVEXT4/tailscale/"

I then saved the file, rebooted the router, copied the tailscaled file across to (successfully) overwrite the previously "busy" file.

I then re-edited S06tailscaled file to remove the commented out # prefix.

Rebooted the router again, checked the tailscale status and version with "tailscale status" and "tailscale version" and it appears all is well.

k.

[EDIT2]
See this post for a different method to update.
 

Attachments

  • Meh.jpg
    Meh.jpg
    224.2 KB · Views: 27
  • Clipboard_03-14-2024_01.jpg
    Clipboard_03-14-2024_01.jpg
    111 KB · Views: 25
Last edited:
Didn't take the time to totally suss your info, but in the end, the problem arose from a running process "actively using" a file you tried to overwrite. The easy solution is to "end" that process beforehand.
 
Didn't take the time to totally suss your info, but in the end, the problem arose from a running process "actively using" a file you tried to overwrite. The easy solution is to "end" that process beforehand.
Thanks glens, the problem is I don’t know Linux well enough (at all really) to know what commands to issue to end the Tailscaled process, despite googling the same (the responses had too many non-specific $ symbols and grep statements for me to feel comfortable issuing them randomly).

The solution was simply to work backwards and stop the processes starting (temporarily) at router boot time. All good👍. I just left the post in the eventuality a similar level of user to me has the same problem.
 
Would it be at all possible for one of you kind souls here to summarise in an idiot-proof, easy, step-by-step way to get Tailscale to be up and running on my GT-AX6000? Reading through the earlier posts on here is like looking at a foreign newspaper to me and I would greatly appreciate some simple guidance.
 
Would it be at all possible for one of you kind souls here to summarise in an idiot-proof, easy, step-by-step way to get Tailscale to be up and running on my GT-AX6000? Reading through the earlier posts on here is like looking at a foreign newspaper to me and I would greatly appreciate some simple guidance.
Hi,

TBH, as there is no automatic script yet (my plea for a script goes out to the coders doing addon scripts) and (per this thread) every time amtm is updated for entware it breaks this Tailscale install, so you need to be confident you can redo it (until someone says OK I will make a script as a bolt-on for amtm).

So due to this install being “on your router” my tentative advice (to separate the two) would be to get an AppleTV (HD or 4K) or maybe repurpose an RPi or an old ThinClient with DietPi and and install Tailscale on that, set it up as a subnet Router, then plug it into your Network via an Ethernet cable.

Anwyay, I will have a go, although it will essentially paraphrase Randomuser777s excellent input.

Your sig doesn't say what you have installed by way of scripts (if any) so it's a wee bit hard to judge your experience with these and my apologies in advance if you're already well on top of the following basic abilities:

a. Formatting disks (USB or SSD plugged into the Routers Ports) as EXT4 (my preference) or with
b. Accessing the Directories inside the "Guts" of the Router via SSH (a CLI or Command Line Interface, I use Putty) or
c. Accessing the same Directories using WinSCP (a Windows-based "File Explorer" which you can use to access files on the Router as well as on the USB Drive (via the 'mnt' shortcut you will see when you access your Router via WinSCP; note that you will only see this AFTER you attach and format a drive).

So with this in mind, I will try to aim at the simplest sequence, then expand on each.

1. Ensure jffs Custom Scripts is ENABLED in your Admin-System menu (see pic below); and

2. Ensure SSH is ENABLED in your Admin-System menu; reboot.

3. Test SSH Access is succesful using Putty and WinSCP; get this right first, you cannot do anything without it. Access your Router's admin IP Address, same as the GUI address, you can run it with the GUI open too. Check in the mnt shortcut what the name of your disk is as you will need it in the 'ARGS' line below (note that you will only see this AFTER you attach and format a drive).

4a. Run amtm from CLI (ssh in to your Router using Putty) and just type amtm. Starting with Asuswrt-Merlin 384.15, amtm is included in the firmware; then

4b. Install entware from the amtm menu (a prerequisite).

4c. Then Install the Format Disk Script from within amtm, it’s called "fd" (unless you just want to use the CLI for formatting the disk). See amtm menu pic below for what it looks like when it is installed. Note I have a couple of other scripts showing in that pic (Diversion, MerlinAU), that you do not need for this install.

5. Plug a USB or SSD into one of your Router's USB Ports and format it (I use Ext4 without journaling), using either amtm’s “fd” script (recommended, just follow the amtm prompts) or use the CLI (see ColinTaylors wiki posts linked below). You 'can' also format it first, then just plug it in, but I prefer doing it on the Router. I believe Ext2 is also OK, but I am no expert on this. Do not forget to name it. At this point, using WinSCP you should be able to navigate to the mnt shortcut.

6. Download the most up to date stable Tailscale “static binaries, other distros” (from Tailscales website, use arm64) to your Windows Desktop, extract them to a Folder. Park them for now. You only need to keep the tailscale and tailscaled files (two files total).

What follows is primarily from RandomUser777

7. SSH into (using Putty) your Router and issue the three commands (one after the other), without "quotes"

"opkg install ca-bundle"
"opkg install tailscale"
"opkg install tailscaled
"

The third one will throw an error, but if you look at post #18 in this thread I got that error too. Randomuser777 said (in post #19) he got it too and just ignored it. I believe it installs it anyway.

8. Fire up WinSCP (slr to Putty but like a Windows Explorer Version, easy to navigate to dirs).

Once into your Router using WinSCP (normally the right pane), navigate back up the directory tree to the very root dir, then go back down and navigate to /opt/bin/. Copy the two Tailscale files you previously saved onto your Windows Desktop DIR and overwrite the ones already in in /opt/bin/.

Make sure they have the same permissions as the originals (executable, etc). I cannot recall if I had to change the permissions and if so how I did so but if you get stuck I can have a look how to do this.

9. Using WinSCP, navigate to and edit the file S06tailscaled in /opt/etc/init.d/ to point to the correct files (make sure your /mnt paths exist/are correct for your setup).
-------
#!/bin/sh
ENABLED=yes
PROCS=tailscaled
ARGS="-tun=userspace-networking -statedir /mnt/YOURDRVNAME/tailscale/"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
. /opt/etc/init.d/rc.func
-------

IIRC you ONLY need to change the ARGS line but please check (see my comments above, on RandomUsers777 original comments). For reference only, see my comments here in post#18.

10. ***Reboot ROUTER****
SSH to CLI using Putty

run "tailscale update"
run "tailscale login"

Note my feedback to Randomuser777 in post#18 (my feedback item 11j; you should see the same.

Running "tailscale update" from the CLI, it said it was already the latest (which I expected as I downloaded the latest in an above step)

running "tailscale login" gave me a specific URL (which I copied to a Browser, Chrome) which allowed me to add the Device to my existing Tailnet. All good.
Existing TailNet in this instance, assumes you already have an Tailscale account set up.

11. Insert the following code into the firewall-start file (make sure your subnet is correct, you probably just need to change the "50" to something else, if anything).

The firewall-start file (there is no .txt or anything, just open it in WinSCP by double clicking) is in the jffs/scripts directory:
-------
tailscale up --accept-routes --advertise-routes=192.168.50.0/24
-------

***Reboot ROUTER****

12. Put these entries in the services-start script (also in jffs/scripts):
-------
/opt/etc/init.d/S06tailscaled start
tailscale up --accept-routes --advertise-routes=192.168.50.0/24

-------
Substitute the .50. Part with your own subnet.

That's it. If you get stuck, drop us a line and I will try and guide you through it.

For formatting the USB Drive on the Router see ColinTaylors Wiki reference but amtm’s fd script is pretty self-explanatory.

For Putty Usage, all you need is an IP Address and a Port.
You can save the login/pwd if you wish, for faster access.
For WinSCP I use SCP Protocol Port 22.
 

Attachments

  • Admin_Sysytem_JFFS_Yes.jpg
    Admin_Sysytem_JFFS_Yes.jpg
    230.3 KB · Views: 10
  • SSH Access.jpg
    SSH Access.jpg
    64.5 KB · Views: 9
  • Important Dirs.jpg
    Important Dirs.jpg
    168.4 KB · Views: 10
  • IMG_9096.jpeg
    IMG_9096.jpeg
    47.9 KB · Views: 8
Last edited:
For formatting the USB Drive on the Router see these tips here:

and
I suggest people refer to the updated information in the wiki that was inspired by those posts.

 
Hi,

TBH, as there is no automatic script yet and (per this thread) every time amtm is updated for entware it breaks this Tailscale install, you need to be confident you can redo it (until someone says OK I will make a script as a bolt-on for amtm).

So my tentative advice would be to get an AppleTV (HD or 4K) or maybe repurpose an RPi or an old ThinClient with Dietpi and and install it on that, set it up as a subnet Router, then plug it into your Network via an Ethernet cable.

Anwyay, I will have a go, although it will essentially paraphrase Randomuser777s excellent input.

Your sig doesn't say what you have installed by way of scripts (if any) so it's a wee bit hard to judge your experience with these (and my apologies if you're already well on top of these):

a. Formatting disks (USB or SSD plugged into the Routers Ports) as EXT4 (my preference) or with
b. Accessing the Directories inside the "Guts" of the Router via SSH (a CLI or Command Line Interface, I use Putty) or
c. Accessing the same Directories using WinSCP (a Windows-based "File Explorer" which you can use to access files on the Router as well as on the USB Drive (via the 'mnt' shortcut you will see when you access your Router via WinSCP; note that you will only see this AFTER you attach and format a drive).

So with this in mind, I will try to aim at the simplest sequence, then expand on each.

1. Ensure jffs Custom Scripts is ENABLED in your Admin-System menu (see pic below); and
2. Ensure SSH is ENABLED in your Admin-System menu; reboot.
3. Test SSH Access is succesful using Putty and WinSCP; get this right first, you cannot do anything without it. Access your Router's admin IP Address, same as the GUI address, you can run it with the GUI open too. Check in the mnt shortcut what the name of your disk is as you will need it in the 'ARGS' line below (note that you will only see this AFTER you attach and format a drive).
4. Install amtm (see separate forum thread). Install the Format Disk Script from within amtm, it’s called "fd" (unless you just want to use the CLI for formatting the disk).
5. Plug a USB or SSD into one of your Router's USB Ports and format it (I use Ext4 without journaling), using either amtm (follow the prompts) or CLI (see posts links below). You 'can' also format it first, then just plug it in, but I prefer doing it on the Router. I believe Ext2 is also OK, but I am no expert on this. Do not forget to name it. At this point, using WinSCP you should be able to navigate to the mnt shortcut.
6. Download the most up to date Tailscale binaries (from Tailscales website, use arm64, see links in my earlier post) to your Windows Desktop, extract them to a Folder. Park them for now.

What follows is primarily from RandomUser777

7. SSH into (using Putty) your Router and issue the three commands (one after the other), without "quotes"

"opkg install ca-bundle"
"opkg install tailscale"
"opkg install tailscaled"

8. Using WinSCP (slr to Putty but like a Windows Explorer Version, easy to navigate to dirs).

Once into your Router using WinSCP (normally the right pane), navigate back up the directory tree to the very root dir, then go down through /opt/bin/. Copy the Tailscale files from your Windows DIR and overwrite the ones already in in /opt/bin/.

Make sure they have the same permissions as the originals (executable, etc)

9. Using WinSCP, navigate to and edit the file S06tailscaled in /opt/etc/init.d/ to point to the correct files (make sure your /mnt paths exist/are correct for your setup).

IIRC you ONLY need to change the ARGS line but please check (see my comments above, on RandomUsers777 original comments).

See those here. https://www.snbforums.com/threads/tailscale-on-asus-rt-ax86u-router.80870/post-888233

#!/bin/sh
ENABLED=yes
PROCS=tailscaled
ARGS="-tun=userspace-networking -statedir /mnt/entware/tailscale/"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
. /opt/etc/init.d/rc.func

10. ***Reboot ROUTER****
SSH to CLI using Putty
run "tailscale update"
run "tailscale login"

11. Insert the following code into the firewall-start file (make sure your subnet is correct, you probably just need to change the "50" to something else, if anything).

The firewall-start file (there is no .txt or anything, just open it in WinSCP by double clicking) is in the jffs/scripts directory:

tailscale up --accept-routes --advertise-routes=192.168.50.0/24
***Reboot ROUTER****

12. Put these entries in the services-start script (also in jffs/scripts):
-------
/opt/etc/init.d/S06tailscaled start
tailscale up --accept-routes --advertise-routes=192.168.50.0/24
-------

That's it. If you get stuck, drop us a line and I will try and guide you through it.

For formatting the USB Drive on the Router see these tips here (but see ColinTaylors note below):

and

For Putty Usage, all you need is an IP Address and a Port.
You can save the login/pwd if you wish, for faster access.
For WinSCP I use SCP Protocol Port 22.
Thanks a million for the super helpful and very detailed and comprehensive instruction. I will definitely have a go at this tonight and will report back. Much appreciated.
 
Prepared USB drive and SSHed into router with no problem but getting this as soon as I input any of the commands from step 7:
"-sh: opkg: not found". What am I doing wrong?
 
Prepared USB drive and SSHed into router with no problem but getting this as soon as I input any of the commands from step 7:
"-sh: opkg: not found". What am I doing wrong?
Having Entware installed on the USB drive is a prerequisite. Entware can be installed through amtm.
 
Apologies for being a pest again. Installed Entware and the first two packages went well but getting this with the third one:

Unknown package 'tailscaled'.
Collected errors:
* opkg_install_cmd: Cannot install package tailscaled.
 
Apologies for being a pest again. Installed Entware and the first two packages went well but getting this with the third one:

Unknown package 'tailscaled'.
Collected errors:
* opkg_install_cmd: Cannot install package tailscaled.
Hi good stuff 👍🏼

If you look at post #18 in this thread I got that error too. Randomuser777 said (in post #19) he got it too and just ignored it (not even sure if command is needed or not).

Apologies on Entware install, Randomuser777 did say install entware using amtm. I forgot to add that; have amended above post, see 4a, 4b, 4c.
 
Last edited:
Hi good stuff 👍🏼

If you look at post #18 in this thread I got that error too. Randomuser777 said (in post #19) he got it too and just ignored it (not even sure if command is needed or not).

Apologies on Entware install, Randomuser777 did say install entware using amtm. I forgot to add that; have amended above post, see 4a, 4b, 4c.
Thank you again for the gentle hand-holding. Neither "firewall-start" nor "services-start" exist in my /jffs/scripts/ directory! I decided to create both manually, changed the permissions to mimic the file that is already there (namely: services-stop) and then just added the lines as per your instructions:

Files.png


Rebooted router and Tailscale appears to be up and running but I cannot connect to it via tailscale nor is it functioning as a tailscale subnet router:

tailscale.png
 
Last edited:
Thank you again for the gentle hand-holding. Neither "firewall-start" nor "services-start" exist in my /jffs/scripts/ directory! I decided to create both manually, changed the permissions to mimic the file that is already there (namely: services-stop) and then just added the lines as per your instructions:

View attachment 57848

Rebooted router and Tailscale appears to be up and running but I cannot connect to it via tailscale nor is it functioning as a tailscale subnet router:

View attachment 57849
Well done, it looks like it’s coming together. Just paying it forward.

I probably had those files in there from my Diversion install but you did the right thing just creating a copy and renaming, then populating.

How are you trying to “connect” to it using Tailscale? Remotely? To test it you should be able to turn on Tailscale (eg from your phone as an App, but just on LTE or 5G or a 3rd party Wi-Fi, not on your own Wi-Fi ), then type the Router IP in your phone browser as if you were inside your network and access the Router via the Webgui.

If you want to set it up as a subnet Router (not sure it needs to be) then you need to do that from the Tailscale admin (see screenshot).

Click the dots then select Edit Route Settings, then select subnet routes and the route IP itself.

The only other thing I can think of is your Routes in the two scripts are not the same as your own subnet?
 

Attachments

  • IMG_1152.jpeg
    IMG_1152.jpeg
    53.1 KB · Views: 9
Last edited:
So near, yet so far. I would be very grateful if you could please check whether the contents of your "firewall-start" and "services-start" files are the same as mine. I have tried adding the additional first lines (and your prior comments) as per screenshots as well but no joy:

firewall.png


service.png


I have tried to remotely connect to the router via tailscale using my Pixel 7 (using LTE rather than same WiFi network) as shown below but has been unable to do so. Also router is not routing tailscale to its subnet (no such option in tailscale admin panel as you can probably see -unlike my GL-MT6000-):

tailtail.png


subnet.png
 
Last edited:
So near, yet so far. I would be very grateful if you could please check whether the contents of your "firewall-start" and "services-start" files are the same as mine. I have tried adding the additional first lines (and your prior comments) as per screenshots as well but no joy:
Based on a check of my own scripts in jffs/scripts, yours both appear correct for your subnet 192.168.1.0 (WebGui 192.168.1.1).
I have tried to remotely connect to the router via tailscale using my Pixel 7 (using LTE rather than same WiFi network) as shown below but has been unable to do so.
Hmmm.. looking at Tailscale docs, "--advertise-routes=192.168.1.0/24" should do this; and it's already in your scripts. You rebooted after the script was amended right?

Also router is not routing tailscale to its subnet (no such option in tailscale admin panel as you can probably see -unlike my GL-MT6000-):
Hmm.. seems not to acknowledge the advertised Routes. I will need to do a bit of thinking about why not (and hope some person cleverer than I comes along in the interim :) ).

Can you check by issuing 'tailscale status' from the CLI please?
Try also issuing 'tailscale up' again just to be sure.

k.
 
Based on a check of my own scripts in jffs/scripts, yours both appear correct for your subnet 192.168.1.0 (WebGui 192.168.1.1).

Hmmm.. looking at Tailscale docs, "--advertise-routes=192.168.1.0/24" should do this; and it's already in your scripts. You rebooted after the script was amended right?


Hmm.. seems not to acknowledge the advertised Routes. I will need to do a bit of thinking about why not (and hope some person cleverer than I comes along in the interim :) ).

Can you check by issuing 'tailscale status' from the CLI please?
Try also issuing 'tailscale up' again just to be sure.

k.
Thank you again for your patience and help. Rebooted on multiple occasions and here is my CLI output:
checkup.png
 
Thank you again for your patience and help. Rebooted on multiple occasions and here is my CLI output:
View attachment 57857
Hmmm. That looks OK to me! (Health check is not pointing to an error that causes issues, see previous posts).
Sorry Aiadi, will need some time to work this one out.

I would (long term) consider moving away from 192.168.1.X to something else as 192.168.1.X is very common and can cause issues or conflicts with other networks (apparently). Not saying this is your current issue (unless your GLiNET device is advertising that same subnet .... please can you check the subnet it is advertising on your (the same) TailNet, even of not attached) but your output above suggests it is not connected.

See here for why not plus some comments on conflicts.
Are you connected using a guest network?

Bit more brutal would be a manual reset as below, but rebooting should have been enough:

tailscale --reset

then either a reboot, or just manually issue:

tailscale up --accept-routes --advertise-routes=192.168.1.0/24
 
Last edited:

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top