If you get a chance to try this, please let me know if you are successful. I did this a few times between firmware resets just to make sure it wasn't a fluke, and it has been working perfectly for weeks.
Recording my (succesful) trial so I can work backwards to delete/undo if needed:
1. I backed up my current Router config and jffs from the WebAdmin GUI. Also (using WinSCP) my list of DHCPs in jffs/nvram/ (custom_clientlist, dhcp_staticlist). Also asus_device_list and cfg_device_list for good measure.
2. I have Diversion installed (on USB in the Router, called DIVEXT4) so I am assuming that installation installed Entware already. In any case when I typed
amtm into the CLI (SSH into Router using Putty), then selected i, then ep, it showed "
This router runs Entware aarch64-k3.10 Server in use: bin.entware.net" so I am assuming that it is already running.
3. I then pressed 1 to check for any updated Entware packages (as I noticed one of your commands 'opkg' was on the list and wanted the latest). I was a bit surprised it updated them all when I hit enter again (not exit) but that was OK.
4. I had to add the
firewall-start file (I used WinSCP to do this, selecting 'File, New' while in the /jffs/scripts/ dir). I gave it the same permissions as the
services-start file that was already in that /jffs/scripts/ dir. I am not sure if this is correct or not, all rwxr-xr-x.
The reason I checked for and added this file at this point was in case any of the steps taken or commands issued prior to editing these files looked for and added anything to them. I did not edit them at this point, see below for when I did so.
5. When I extracted (d/l from here
https://pkgs.tailscale.com/stable/tailscale_1.58.2_arm64.tgz ) the .tgz file to my windows desktop (generic path is
https://pkgs.tailscale.com/stable/#static choose arm64, for future ref), I got the
tailscale and
tailscaled files as shown in your screencap, but also a
systemd dir. I am not sure if I should have copied that dir across too (after step 6 below). I did
not do so and that seems OK.
6. I then ran these commands via the CLI (SSH into Router using Putty):
opkg install ca-bundle
opkg install tailscale
opkg install tailscaled
The output was as follows:
XXXXX@RT-AX86U-0E30:/tmp/home/root# opkg install ca-bundle
Installing ca-bundle (20230311-1) to root...
Downloading
https://bin.entware.net/aarch64-k3.10/ca-bundle_20230311-1_all.ipk
Configuring ca-bundle.
XXXXX@RT-AX86U-0E30:/tmp/home/root# opkg install tailscale
Installing tailscale (1.46.1-1) to root...
Downloading
https://bin.entware.net/aarch64-k3.10/tailscale_1.46.1-1_aarch64-3.10.ipk
Configuring tailscale.
XXXXX@RT-AX86U-0E30:/tmp/home/root# opkg install tailscaled
Unknown package 'tailscaled'.
Collected errors:
* opkg_install_cmd: Cannot install package tailscaled.
XXXXX@RT-AX86U-0E30:/tmp/home/root#
The first two went OK, the last one threw an error as above in
bold, but checking the contents of the /opt/bin/ dir via WinSCP, it seemed to have put the
tailscaled file in there anyway?
7. I then copied the
tailscale and
tailscaled files I had extracted above (on my Windows Desktop) across to /opt/bin/ using WinSCP.
8. When I edited
/opt/etc/init.d/S06tailscaled I found most of these lines were already in that file; IIRC I only had to change the mounted USB device name (to DIVEXT4) and delete some text off one line.
#!/bin/sh
ENABLED=yes
PROCS=tailscaled
ARGS="-tun=userspace-networking -statedir /mnt/DIVEXT4/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
I then rebooted the router by issuing
reboot at the CLI.
9. firewall-start mods
When I edited the firewall-start file, I
added #!/bin/sh to the top as it was empty, having been newly created by me, as described above. I do not know if it was needed, but other files seemed to have it, so it ended up like this:
#!/bin/sh
tailscale up --accept-routes --advertise-routes=192.168.XX.0/24
EDIT: I also added this line as recommended below.
tailscale set --auto-update
10. services-start mods (XX being my subnet).
IIRC this file already had “Diversion # added by amtm” and some other lines in it.
I added:
/opt/etc/init.d/S06tailscaled start
tailscale up --accept-routes --advertise-routes=192.168.XX.0/24
EDIT: I also added this line as recommended below.
tailscale set --auto-update
11. Update and Login
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.
12. I would like to eventually set this behind a CGNAT ISP, so I needed it to be set up as a Subnet Router.
ref.
https://tailscale.com/kb/1019/subnets
I did this from the Tailscale Admin (
https://login.tailscale.com/admin/machines). It works from my Phone (LTE) to my Router, so far so good. However I also checked if it worked WITHOUT being designated a Subnet Router;
it did not. Maybe there are other Tailscale admin selections I am missing?
13. I then checked the "t
ailscale status" by issuing that command from the CLI which said (as well as listing all of my Tailscale Devices):
# Health check:
# - dns-os: getting OS base config is not supported
# - dns: getting OS base config is not supported
I have no idea what this means but presumably it is because ASUS Merlin FW is not supported by Tailscale or something like that?
ref.
https://pkg.go.dev/tailscale.com/net/dns#pkg-variables
14. I then ran
tailscale set --auto-update manually from the CLI, which seemed to work (no errors) but does it need to go into
firewall-start or
services-start? If not, then I am not sure where to put it to make it check automatically?
EDIT: response below suggests both.
15. Files to Delete if Undoing
The install seems to also have installed two other files
locale.new and
localedef.new (I think, sorry did not screencap early enough) are these new?. If so, they are files I can delete later if undoing this, along with deleting
tailscale and
tailscaled, and editing the
firewall-start file and
service-start files to stock. What else would I need to do to go back to scratch, can I just reset jffs in the WebGUI (Format JFFS partition at next boot from Advanced/System Tab) then restore the Config files I saved above?
I will try this setup for a while. I really have no idea what I am doing here or what these CLI commands all mean, but I am pretty good at following directions.
Thank you once again for your patience and clear directions, nice to have one device doing it all!
k.