What's new

Tutorial **Tailscale On Merlin**

  • 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!

If the router is running RMerlin's F/W and you have installed Entware successfully using AMTM then you should have the following line in your "/jffs/scripts/post-mount" script:
Bash:
. /jffs/addons/amtm/mount-entware.mod # Added by amtm
The above line ensures that all installed Entware services are started during reboot after the USB drive partition where Entware was installed is mounted. This assumes, of course, that the script starting the specific service (e.g. "/opt/etc/init.d/S06tailscaled") follows the expected structure & format to work with the Entware services startup process.

If one does not have the above line in the "post-mount" script it would indicate that Entware was not installed via AMTM, or perhaps it was not installed successfully or completely for some reason.

If the above line is present in the "post-mount" script but the service is not started during reboot, it's likely that something in the service script is not properly set up as expected or a dependency is missing so the service fails when called by the Entware startup process.

Note that adding a call to start up an Entware service in the "services-start" script is generally not a good idea because there's no guarantee that the USB drive partition where Entware is installed has already been mounted *before* the "services-start" is executed. Entware services should be started from the "post-mount" script (or from another script executed within it).

Just my 2 cents.
I did clean install(router reset) to see what was going on with people reporting Tailscale exits upon ssh disconnect. I installed entware(via amtm) and tailscale afterwards, but I had same issue with exiting. Installing ca-bundle didnt fix the thing but entware-opt did. And by that I mean that rc.func and rc.unslug were missing(adding manually didnt work either), but installing entware-opt fixed it. W/O them auto-start is impossible, at least in my case.
If "./jffs/addons/amtm/mount-entware.mod" works, then its even better and I thank you for sharing.

PS
I'm not making another video just for installing entware-opt 😁
 
Last edited:
I did clean install(router reset) to see what was going on with people reporting Tailscale exits upon ssh disconnect. I installed entware(via amtm) and tailscale afterwards, but I had same issue with exiting. Installing ca-bundle didnt fix the thing but entware-opt did. And by that I mean that rc.func and rc.unslug were missing(adding manually didnt work either), but installing entware-opt fixed it. W/O them auto-start is impossible, at least in my case.
If "./jffs/addons/amtm/mount-entware.mod" works, then its even better and I thank you for sharing.

PS
I'm not making another video just for installing entware-opt 😁
This is not be necessary because entware-opt is a core part of the normal Entware install process. If your router doesn't have it then it's probably caused by you running a non-standard or unsupported setup.

The problem with the tailscaled process being killed when the SSH session is disconnected can be fixed by amending the following line in S06tailscaled.
Code:
PREARGS="nohup"
 
Last edited:
If the router is running RMerlin's F/W and you have installed Entware successfully using AMTM then you should have the following line in your "/jffs/scripts/post-mount" script:
Bash:
. /jffs/addons/amtm/mount-entware.mod # Added by amtm
The above line ensures that all installed Entware services are started during reboot after the USB drive partition where Entware was installed is mounted. This assumes, of course, that the script starting the specific service (e.g. "/opt/etc/init.d/S06tailscaled") follows the expected structure & format to work with the Entware services startup process.

I always learn something new from @Martinski .... thanks so much! :)
 
This is not be necessary because entware-opt is a core part of the normal Entware install process. If your router doesn't have it then it's probably caused by you running a non-standard or unsupported setup.

The problem with the tailscaled process being killed when the SSH session is disconnected can be fixed by amending the following line in S06tailscaled.
Code:
PREARGS="nohup"
Nope, that didn't work for me. You're always after me buddy, I better run away.
If theres an "unsupported" part of SNB I'll write there instead just point the link.
 
Last edited:
Nope, that didn't work for me. You're always after me buddy, I better run away.
If theres an "unsupported" part of SNB I'll write there instead just point the link.
I may have missed it, but what kind of router/FW version are you running?
 
And by that I mean that rc.func and rc.unslug were missing(adding manually didnt work either), but installing entware-opt fixed it.
That's really interesting as I have certainly had these missing on a couple of occasions when I installed entware via amtm as usual. This had resulted in the whole process of trying to get tailscale to fall apart until I redid the entware install again and again. Why is entware not installing completely via amtm when the process appears to otherwise be going smoothly is beyond me!! I will certainly try your method (may be on top of an initial amtm's entware install).
 
Okay I found what was the issue. Follow my steps:
Is the issue that your are eluding to here the broken entware installation via amtm? or is there another problem that you have managed to identify? Thank you again for your help.
 
Is the issue that your are eluding to here the broken entware installation via amtm? or is there another problem that you have managed to identify? Thank you again for your help.
What model router/FW level are you running, @Aiadi?
 
I am currently on GT-AX6000_3004_388.7_alpha2-g90b483050e
I'm practically running the same thing. I've replicated the tailscale install 2x without issues on the GT-AX6000 and RT-AX88U. Entware was installed as default through AMTM on initial setup.

1. opkg update
2. opkg install tailscale
3. tailscale update
4. modified this line in the /opt/etc/init.d/S06tailscaled file: ARGS="--tun=userspace-networking --state=/opt/var/tailscaled.state"
5. modified this line in the /opt/etc/init.d/S06tailscaled file: PREARGS="nohup"
6. /opt/etc/init.d/S06tailscaled start
7. tailscale up --accept-routes --advertise-routes=192.168.50.0/24 (and follow the link it generates)

From this point, rebooting your router will cause tailscale service to come up automatically, as per @Martinski's post a little ways up.

(EDIT: steps edited based on @ColinTaylor's latest findings)
 
Last edited:
I'm practically running the same thing. I've replicated the tailscale install 2x without issues on the GT-AX6000 and RT-AX88U. Entware was installed as default through AMTM on initial setup.

1. opkg update
2. opkg install tailscale
3. tailscale update
4. modified this line in the /opt/etc/init.d/S06tailscaled file: ARGS="--tun=userspace-networking --statedir=/opt/var/tailscale/ --state=/opt/var/tailscale/tailscaled.state"
5. modified this line in the /opt/etc/init.d/S06tailscaled file: PREARGS="nohup"
6. /opt/etc/init.d/S06tailscaled start
7. tailscale up --accept-routes --advertise-routes=192.168.50.0/24 (and follow the link it generates)

From this point, rebooting your router will cause tailscale service to come up automatically, as per @Martinski's post a little ways up.
Many thanks indeed Viktor. I have already done exactly that (on multiple occasions) and the node is successfully added with tailscaled showing as running but I could never get it to connect (no green dot) no matter wwhat I have tried. It might be that my multiple tests with countless reboots, USB reformats and amtm resets as well as entware re-installs could have broken something in the process. I will try again probably with a full router reset at one point this weekend. You guys are gold...
 
Many thanks indeed Viktor. I have already done exactly that (on multiple occasions) and the node is successfully added with tailscaled showing as running but I could never get it to connect (no green dot) no matter wwhat I have tried. It might be that my multiple tests with countless reboots, USB reformats and amtm resets as well as entware re-installs could have broken something in the process. I will try again probably with a full router reset at one point this weekend. You guys are gold...
Do you have any devices connected with a green dot? If so, can you try pinging one of their IPs (100.x) from your router? You sure you're not blocking traffic? Have you checked your syslog to make sure something isn't blocking outbound traffic?
 
Big thanks again to all for their excellent help and guidance. Several attempts later trying different things, this sequence worked flawlessly for me. Not sure which of the extra steps I have followed finally managed to do the trick but I will post them to hopefully help with the final wiki:

Tailscale on Asusmerlin.png
 
Last edited:
Big thanks again to all for their excellent help and guidance. Several attempts later trying different things, this sequence worked flawlessly for me. Not sure which of the extra steps I have followed finally managed to do the trick but I will post them to hopefully help with the final wiki:

View attachment 58052
Glad to hear you had success!

Just one note, the "entware-opt" is automatically installed through the normal entware install process when doing so through AMTM, per @ColinTaylor's notes above. You should be able to eliminate that line.
 
Glad to hear you had success!

Just one note, the "entware-opt" is automatically installed through the normal entware install process when doing so through AMTM, per @ColinTaylor's notes above. You should be able to eliminate that line.
Noted and seen that post but I had the feeling that the bulk of my problems was with a broken entware install (although would not know how to prove it). Opted to add that line for completion and as I thought that it would not do any harm anyway. Also not sure if choosing the second entware server (rather than recommended first) could have made any difference but quite happy with the outcome.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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