-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synology: tracking bug for use cases #1995
Comments
On clean installs we didn't set use iptables, but during upgrades it looks like we could use old prefs that directed us to go into the iptables paths that might fail on Synology. Updates #1995 Fixes tailscale/tailscale-synology#57 (I think) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
On clean installs we didn't set use iptables, but during upgrades it looks like we could use old prefs that directed us to go into the iptables paths that might fail on Synology. Updates #1995 Fixes tailscale/tailscale-synology#57 (I think) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
On clean installs we didn't set use iptables, but during upgrades it looks like we could use old prefs that directed us to go into the iptables paths that might fail on Synology. Updates #1995 Fixes tailscale/tailscale-synology#57 (I think) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> (cherry picked from commit a04801e)
On clean installs we didn't set use iptables, but during upgrades it looks like we could use old prefs that directed us to go into the iptables paths that might fail on Synology. Updates #1995 Fixes tailscale/tailscale-synology#57 (I think) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Signed-off-by: Simeng He <simeng@tailscale.com>
Thanks for all your work here on making Tailscale work for Synology! Is it expected behavior that v1.12.1 with |
With |
Thanks @maisem. I think my confusion was from |
Sorry comment got sent too early. Updated it. We could probably support this using a userspace relay (#707). |
|
@bradfitz Confirmed it's not working for TCP/UDP on my end with DSM7 and v1.12.1. Happy to share any debug information that's helpful! |
I just upgraded to DSM7 and I am successfully able to use the nas as an exit node and a subnet router. |
@maisem Of course, see below.
|
Hi, I have installed Tailscale (1.9.156) on my DS720+ running DSM 7.0-41890 and my nas shows up in my machines list but as I was trying to add subnet routing I get an error when trying to run the following:
any ideas about what I'm doing wrong?
|
Installed from the Package Center, the tailscale binaries should be in /volume1/@appstore/Tailscale/* which isn't included in $PATH. |
@DentonGentry thanks, I just found it and fixed my issue :-) |
New synology kb article: https://tailscale.com/kb/1131/synology/ |
The new KB article linked by @apenwarr is great! Thanks to whoever wrote and posted it. It mentions that exit nodes can only be configured at the command line, but I don't see instructions for how to do that. Is it just the generic exit node instructions plus turn on IP forwarding (e.g. |
Yes, that should be the set of steps. Though please let us know if it works
for you :)
ᐧ
…On Tue, Aug 17, 2021 at 12:48 PM Wes Morgan ***@***.***> wrote:
The new KB article linked by @apenwarr <https://github.com/apenwarr> is
great! Thanks to whoever wrote and posted it.
It mentions that exit nodes can only be configured at the command line,
but I don't see instructions for how to do that. Is it just the generic
exit node instructions plus turn on IP forwarding (e.g. echo 1 >
/proc/sys/net/ipv4/ip_forward?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1995 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFA4AMOKA222HPF4NQAG3T5KHFPANCNFSM45USYXKA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
Avery Pennarun // CEO @ Tailscale
|
Where can I find the steps to enable subnet on Synology DSM7 ? |
@sim-san you have to do it from the command line. Use ssh to access your NAS, then run similar command to the one I used but with the subnets you like:
I think I did this as root (ran sudo -i before the command shown above) |
You mention two use-cases. I have a third that I think should be supported.
This has a lot of important use-cases. Specifically, offsite backup being one important one. |
We're working on fixing that: the Synology package currently in the package center is being lumped in with Linux systems, for where there is a later version available and the admin panel is flagging it as hving an update. 1.9.156 is the version currently available in the package center. The next release in the package center should be out soon and will be a 1.12 release which, importantly, should also let us distinguish it in the admin panel. For now, please ignore the update indication. |
Update: we've published https://tailscale.com/kb/1152/synology-outbound/ for instructions with how to do outbound connections from Synology (with DSM7). |
First of all, thank you for a such useful add-on! I use subnet routing on my Synology. Initially, I was using CLI commands to enable routing but now I trigger Tailscale setup from Synology Task Scheduler. It will most likely survive any system or plugin update (and, of course, a reboot). It's a No-CLI version. I created a new task that runs on boot under root account. E.g:
The "script" waits for tailscaled deamon at boot. As you see in the example, timeout is 300 seconds to prevent unexpected interruptions of boot process. I tested it on DSM7. |
The link provided mentions version 1.12.4 from github but newest version on github is 1.12.1 |
To paraphrase #1995 (comment), TS DNS not working is WAI. However seems that the Aside: Synology DSM 7 does not deal well with an AWOL DNS server: if you manually configure the NAS DNS to 100.100.100.100, and TS isn't operating, you won't be able to log in via the web UI ! (fortunately ssh still works) Aside: would be good for |
Updates tailscale/tailscale#1995 Signed-off-by: Federico Iezzi <fiezzi@google.com>
Updates tailscale/tailscale#1995 Signed-off-by: Federico Iezzi <fiezzi@google.com>
If you have Mail Server running, tailscale running and the DNS set to 100.100.100.100 as primary and a public one as secondary, you will get CPU usage of tailscale through the roof. Only fix I have found is to install DNS server, make it recursive and make a forward only zone of |
Is anyone running Tailscale on DSM 7.2 ? I (foolishly in hindsight) updated both my devices to 7.2 and outgoing connectivity to other TS hosts is broken. Running through the https://github.com/tailscale/tailscale/blob/main/cmd/tailscale/cli/configure-synology.go 'script' manually, no errors pop up; the tun device is present and the tailscaled binary has the intended capabilities. However, the tun interface does not show up in
However if I configure a static route pointing to the local
|
The large majority of Synology devices are on DSM 7, with a healthy number on DSM 7.2 and the rest on earlier DSM7 versions. If you updated from DSM6 directly to DSM7.2, you'll need to uninstall and reinstall Tailscale from the Package Center. It makes several decisions at install time based on whether it is running within DSM6. |
...
Closing this out; I suspect I was confused earlier in that I had the mistaken idea that the Synology setup supported accepting routes, it doesn't (known limitation: https://tailscale.com/kb/1131/synology/#limitations--known-issues). TS 1.38.4 and 1.44.0 works fine on DSM 7.2 for me. |
So, I've come back around after resolving an issue that I'd run into where my Tailscale app got into a broken state with my session but uninstalling/reinstalling would not fix the issue. In such case, I ended up dropping into a root shell over SSH to my Synology NAS and deleting the contents of the following directory:
If you want to be more targeted (e.g. retaining your log files) you can likely drop just the
After wiping this out, I was able to successfully log back in through my IdP and setup my Synology NAS as a node again. |
Hi all. Any ideas when the option --accept-routes will be available? |
If I may, I think an obvious use-case is the one you might use a traditional VPN for: remote access to mapped network drives, for example from a laptop away from home/work. Tailscale works very well for this on my Synology DS218+ (DSM 7.2), with MagicDNS making the mapping even easier from Windows laptops, however I did have to add a subnet route to the Diskstation for it to work. I don't need/want access to my whole network, so I added the IP of the Diskstation with /32. |
I apologize if this is a foolish question (and it will be) but my current understanding is that I can't run Mullvad as an exit node on Synology Tailscail since I'm unable to run |
@bradfitz could we add a bullet point for |
I don't get what you are trying to reach, maybe you need to create a TUN device? |
This comment was marked as resolved.
This comment was marked as resolved.
I am trying to do the same thing and running the above command on my NAS gave me an error and sent me to this page. My use call is that my usenet provider appears to be throttling the downloads on my Synology NAS based on my IP Geolocation (I am currently on a 12 month assignment overseas). I'm following up with the provider separately on that but the support is hopeless. If I download from my Mac and use my remote exit node in Australia, I get no throttling. This is my current workaround. But I want the downloads farmed off to my NAS which I leave on 24/7. Any workaround to get the Synology to route via my remote exit node? |
@mwi001 Did you solve this somehow? Does disabling SNAT not work on Synology? Is running Tailscale in a docker container with |
I managed to get it working by using a Task Scheduler script on Synology. The issue is that Synology doesn't support In the Task Scheduler, as root on boot, I used this script: /var/packages/Tailscale/target/bin/tailscale configure-host; synosystemctl restart pkgctl-Tailscale.service; /var/packages/Tailscale/target/bin/tailscale up --reset --accept-routes |
I found this same solution posted on reddit but I get this:
|
I am wondering that you have zsh on your DSM, it is not installed on my synology. Did you by any chance did not run the command on the synology but locally? The other option is that zsh did not have the binary in the PATH variable, on my system the binary is located in |
just curious about the updates on this. It seems for me since the last update of the synology, i`m unable to route traffic towards subnets behind another node. we cant use --accept-routes, but i was able to provide a ip route add 192.168.10.0/24 via 100.123.x.x before. but now i have 7.2.2-72806 Update 1 installed, this does not seem to work anymore. Any other having this as well? |
I could swear it worked before and now it doesn't
|
I had the same issue after updating to DSM 7.2.2-72806 Update 1, and I solved it by setting up three separate scheduled tasks in the Control Panel's Task Scheduler to run on boot. Here's the exact process I used:
This is the workaround that worked for me, but there may be other ways to make it work. Let me know if this helps or if you find an alternative solution! |
Thanks, I will try this out. Before you responded, I managed to get into my old synology setup (the working one) and confirmed that everything is stil working fine. I noticed the difference in versions, working one is 1.76.1, non-working is 1.78. After checking the debug prefs outputs on both, these are the only two different things: What does it look like on your machine with the workaround you found? |
Tip for Enable Outbound ConnectionsTo enable outbound connections with TUN device after an automatic update, do NOT use the plain command
That command will
!!! ContextWhen Tailscale automatically updated, it broke my backup (Hyper Backup) until I rebooted my NAS. Spent a few hours this morning figuring out the issue, devising the solution above, and testing it to my satisfaction. Recommended scheduled task for update: Recommended triggered task for enabling outbound connections Output I saw from
Output I saw from
|
FYI, I just learned that for DSM7, the HTTPS certificates can be auto-renewed with a scheduled task with the undocumented command See the clear tutorial from Simmo Saan (Sim642). See more details in Tailscale KB: Enabling HTTPS, Github issue #4674 and pull #10994, and on and on Reddit. |
Tracking of items related to synology launch:
Tailscale in the Synology package center: https://www.synology.com/en-us/dsm/packages/Tailscale
Synology devices are Linux but have a very different environment than typical Linux distros: DSM6 vs DSM7 (bug) limits what we're allowed to do or how much root capabilities we have, the iptables binary is busybox or something, some iptables kernel modules aren't available (varies by model/version?).
As of Tailscale 1.8 we decided to start not relying on iptables and instead start using the hybrid netstack mode (#707) when needed.
But backing up, use cases.
There are two main use cases I think we should care about for Synology:
For (1), we can use TUN or not TUN for the Tailscale IP itself.
tailscaled
handles Synology specially by specifying a netstack (userspace) mode as a fallback: https://github.com/tailscale/tailscale/blob/v1.8.5/cmd/tailscaled/tailscaled.go#L73For (2), as of 1.8.x, we always use hybrid netstack mode to forward incoming traffic to the LAN. The kernel is unaware of it.
The things we don't support on Synology are:
tailscale up --accept-routes
, as we don't mess with the routing table or use iptables.tailscale up --netfilter-mode=XXX
value other thanoff
.Not having
--accept-routes
does mean that a Synology machine itself can't connect to non-Tailscale addresses that are only accessible via other node's advertised routes. We might add support for that later, once the DSM6-to-DSM7 transition is further along and we're running well on DSM7 and have a better lab environment to test a range of DSM7 devices.Front conversations
The text was updated successfully, but these errors were encountered: