-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 NAS instructions #41
Comments
Nice! Thanks for the input. I'm guessing this is related to issue #26 as well. I'll add a reference to it from the README the next time I'm doing some changes. Maybe expand the known issues section to be a Known Issues/FAQ/Tips and Tricks kind of thing. |
The --dns options will be used to write the containers /etc/resolv.conf You should maybe instead mount something to /etc/resolvconf/resolv.conf.d/head that will be prepended to your /etc/resolv.conf when resolvconf generates it. Or something like that. It might fix the issues. And if it don't I would just exec into the container (docker exec -it bash) and change stuff manually and test using dig/ping until it resolves the hostnames. When you change the /etc/resolvconf/resolv.conf.d/head file you can make resolvconf reload the config based on your changes by running "resolvconf -u" |
Thanks, when I get time I'll give it a try. As it is it seems to work well enough, though. |
@timkelty Thanks very much for this outline, I'm also trying to run this on a Synology NAS. @haugene Unfortunately the Synology GUI doesn't support Any chance of adding back the RESOLV_OVERRIDE option? I think this would work seamlessly from the Synology GUI. |
@timkelty you are the man. Thank you very much. I searched for two days but the solution was just premade here.. haha |
@Khogniak glad to be of service! |
@timkelty I feel I'm almost there getting ths running on my Synology; but the tracker cannot connect. Any clues, which settings are not ok? Never mind, the DNS settings could not be added as an environment variable. Had to add the container via logging in via ssh terminal and run the full command including --dns settings |
@rolandb5 👍 Can't remember if that's how I did it, but you got it working? |
Yep, didn't know how to run the DNS command via the Synology GUI. SSH did the trick. If someone needs my command line entry to get this running, let me know. |
@rolandb5 Yes, please let me know what the SSH command is ! :D |
@TheWolf474 docker run --privileged --dns 8.8.8.8 --dns 8.8.4.4 -d -v /your/path/:/data -e "OPENVPN_PROVIDER=PIA" -e "OPENVPN_CONFIG=Netherlands" -e "OPENVPN_USERNAME=XXXXX" -e "OPENVPN_PASSWORD=XXXXX" -p 9091:9091 haugene/transmission-openvpn |
FYI - I had to re-apply this after upgrading to DSM 6 |
I really want to get this working, but it's a bit overwhelming for a novice like me :) I'm running the DMS 6.0 and got the docker container to start, with the help of @timkelty script. But i cannot access the web gui and i don't know how to get the --dns options to work.. if i try the command via SSH "docker run --privileged --dns 8.8.8.8 --dns 8.8.4.4 -d -v /your/path/:/data -e "OPENVPN_PROVIDER=PIA" -e "OPENVPN_CONFIG=Netherlands" -e "OPENVPN_USERNAME=XXXXX" -e "OPENVPN_PASSWORD=XXXXX" -p 9091:9091 haugene/transmission-openvpn" only gives me an error "Cannot connect to the Docker daemon. Is the docker daemon running on this host?" I can't get the script to run at startup :( have done the chmod +x Any helt would be appreciated :) |
Yep - so looks like I'm in the same boat as some of you after DSM 6 upgrade. @Khogniak seems to be right that the rc.d script doesn't work anymore. But perhaps just moving it to rc.sysv will fix? So when I have my container running now ( on DSM 6.0), i can connect to the Transmission client and add torrents, but nothing downloads. If I inspect one, I can see that it can't connect to any trackers, presumably because the --dns options aren't set or working. I can't run the |
@timkelty : Yep, I just noticied that after posting, my downloads were stuck too and it didn't connect to trackers. So ;
You are now logged as root and can run the |
@Khogniak that did it! |
@Khogniak I've put the script at the new location you mentioned for DSM 6.0 but i won't run at startup :( If i start the script with sudo sh S01tun.sh i can start the container so the script is fine, any suggestions? :P |
Here's what I did:
|
@timkelty Does using Task Scheduler works for you? Because for me, even if i specify the scheduler to run it as root, it act like when we run it manually as admin : torrents are stuck and it doesn't connect to trackers. |
@Khogniak It seems to be working yes. Though I still seeing lots of "Could not connect to tracker" errors, stuff seems to be downloading, maybe that's normal. To be clear: |
@timkelty Hum ok, can you please detail your sheduled task ? |
@@Khogniak ok...here's what I've learned through testing: If DSM/GUI EVER starts your container (including manually, or even if it is already running and you restart), your You can run the You can then restart the container with So, I'm not really sure how to get it working consistently. Seems like we need DSM's docker package to suppose the dns option. Or should explore @haugene's suggestion:
|
Ok, this seems to fix it for me! Add this line to your docker run command: And on our DS, add
Now you don't even need the |
For me too ! |
I don't use any --dns options and my connects to trackers fine. |
@malmentm How about DNS leak ? |
How do i check for dns leak? I only tested ipeak.net torrent test. I use tigerVPN by the way, they say on the homepage that their DNS servers are provided on connect. |
Strange issue with the script. I have put it in the right place on the server, but it seems i cannot run it. All the command work correctly when writed manually, but the script doesn't seem to start. If i try to run it manually, i obtain a : -ash: ./S01tun.sh: not found . The other script in rc.d can be launched without any error. Permission seems ok (-rwxr-xr-x for all file in the folder). I got no clue on what's going on. |
@Khogniak DNS leak is an interesting one. But it depends on what your resolv.conf will be set inside the container I guess. Which again is up to the Docker daemon and your host system. If your ISP DNS servers are set, they will be treated as external traffic and routed through the VPN interface so you're OK. But if your resolv.conf is something like 127.0.0.1 or 172.17.x.x (docker ip space) I guess the DNS requests will be routed through your host and you'll have a leak. Anyways, probably a bit off topic for the Synology thread here. But might be worth some exploring in another issue. And perhaps a little notice in the README that setting --dns could be the safer choice. |
@haugene Hum, |
@haugene I hadn't considered someone putting in a local IP. |
Yup. Using Google DNS you should be fine, no DNS leaks. I don't think people would set a local IP with intent either. Just figured that it could probably be some scenario where the host by default sets itself as DNS server for the containers. And that could be trouble. But as long as the DNS servers are set in a public IP range, it will be routed through the VPN interface. |
Here is the whole summary using everyone's informations. (Could maybe be improved / added to the doc cc @haugene ) :
|
Thanks @Khogniak! Great summary for this issue. I will include it in the README and then maybe close this issue at some point :) Another Synology-thread will probably pop up, but it looks like the first iteration of NAS-tinkering has brought good results. Kind of busy these days, but I'll sit my self down and just do it at some point. Until then... If anyone is up for it, feel free to submit it as a PR! |
Readme is now updated, as of PR #62. Closing this issue. |
For those using the Synology Docker GUI that want to use that and not the command line for the docker command you can make this work by slightly modifying the instructions for Synology from above. Add the resolv.conf file to a location that you can access for the docker image and mount it as /etc/resolve.conf. Set the Docker container to "Execute container using high privilege". You still need to set the TUN.sh script up, but otherwise the rest of the Docker stuff can be down in the GUI. |
Have been trying to get this to work and am having issues with TUN. Any ideas? |
@jonk999 I used to have the same error. If you run docker via the synology GUI check the high privilege box for your container. It allows the docker container to run as root and use all the devices of the host (see https://docs.docker.com/engine/reference/run/#additional-groups section Runtime privilege and Linux capabilities and maybe other for more info on docker and privileges). |
I've added a chmod to tun device to allow unprivileged docker containers to use tun device and send traffic through the vpn. Related to this issue: haugene#41
After some tinkering I got this working on a Synology NAS (412+).
Just wanted to share in case anyone else was trying.
Here's what I had to do:
--dns 8.8.8.8 --dns 8.8.4.4
to thedocker run
command (as noted in README)/usr/syno/etc.defaults/rc.d/S01tun.sh
The text was updated successfully, but these errors were encountered: