-
Notifications
You must be signed in to change notification settings - Fork 93
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
Attempting to start openvpn fails as it's unable to create /dev/net/tun #53
Comments
Seeing the same error in the logs...
Followed the great instructions in setting up the container, even tried running the container with PGID and PUID as 0 (root) and with high privilege for the container but still the same error. Synology DSM DSM 6.2.2-24922 4 |
I also try to deploy this on a NAS (terramaster) and I came across the same issue. however, because i'm running the container from the web management tool, I cannot include this parameter. can someone help me on how to include this parameter as an optional variable like "DEVICES" that can take the values like "/dev/net/tun" and to be appended in the run command ? |
@unclebobuk @triksmelb This helped me resolve that issue running it on a Synology NAS. |
@stroskl depending on the container, you will most likely have to edit the environmental settings manually. I did it in a text file, SSH into my NAS, sudo -i and paste the script in there. I used this guide (had to modify it for NordVPN but the principle is the same). http://haugene.github.io/docker-transmission-openvpn/synology-nas/
In my opinion Synology Docker Web UI is great but limited for requirements like this. |
I ran into the same issue on my Synology DS918+ this afternoon. In my case /dev/net/tun exists. |
Thanks. I tried again today, even though I had it running before with high privilege on, and the TUN/TAP device is no longer the issue, but I have another one: Linux ip -6 addr add failed: external program exited with error status: 2 I have no idea what I'm doing wrong. I tried adding VPN_USERNAME and VPN_PASSWORD to the environment but that just quickly loops it in starting and crashing. BTW I have a .ovpn file in my config. EDIT: I solved the issue. The problem was my .ovpn file generated by my VPN provider. I had to select IP layer exit: IPV4 only and connect with IP layer IPV4. My ISP doesnt provide ipv6 so i guess thats why it didnt work and my bridge shows IPV6 is disabled. The container is now running and i can access the web GUI. |
@Caedendi Please open a new issue. |
I'm getting this issue after moving my NAS to a different VLAN. I'm sure it's something simple, but I'd appreciate if someone were to offer a hand here...
The command used to kick this off is:
and it's running on a Synology NAS. It was running just beautifully until I moved it to the new address... The new address is 192.168.10.10. |
I found a solution that worked for me in this post by @blacky14 One option was to run as privileged, another was:
I hope that helps others in this thread! |
Docker-compose that finally got running:
|
I have an Asustor NAS and I'm getting the same issue. I cannot correct the issue by adding the suggested lines:
The docker container is created by running the following command: |
For Asustor Nas users on the latest firmware, simply install the VPN Server app via App Central and it will create this directory for you. |
Resurrecting this with a resolution I found. I tried implementing the suggestions above via docker CLI, with no positive outcome. I'm still on DSM 6, BTW (I put off upgrading to DSM 7 long enough). Anyway, I found a post on a site for a different setup (not this repo as I was considering other alternatives), and the method to include TUN in that setup fixed the issue I was having with a vanilla installation per the instructions of this repo. https://drfrankenstein.co.uk/2022/09/26/qbittorrent-with-gluetun-vpn-in-docker-on-a-synology-nas/ The process requires creating a scheduled task to run at boot with the below code snippet. Since I haven't upgraded to DSM 7, I'm not sure if this will correct the issue. I haven't run this through its paces to understand if the scheduled task will run prior to my docker container spooling up, but for now, this has corrected my problem.
|
I forget what I did but this particular container seems to have been
abandoned. I'm still using it because it works well and isn't that far out
of date on the qbittorrent version. I tried another container based on this
one and got a warning for torrenting from my ISP. With this one, I've never
had any issues. That said, make sure you bind it to the tun interface.....
…On Sat, Sep 9, 2023, 1:58 PM Robert Longo ***@***.***> wrote:
Resurrecting this with a resolution I found.
I tried implementing the suggestions above via docker CLI, with no
positive outcome. I'm still on DSM 6, BTW (I put off upgrading to DSM 7
long enough). Anyway, I found a post on a site for a different setup (not
this repo as I was considering other alternatives), and the method to
include TUN in that setup fixed the issue I was having with a vanilla
installation per the instructions of this repo.
https://drfrankenstein.co.uk/2022/09/26/qbittorrent-with-gluetun-vpn-in-docker-on-a-synology-nas/
The process requires creating a scheduled task to run at boot with the
below code snippet. Since I haven't upgraded to DSM 7, I'm not sure if this
will correct the issue. I haven't run this through its paces to understand
if the scheduled task will run prior to my docker container spooling up,
but for now, this has corrected my problem.
#!/bin/sh -e
insmod /lib/modules/tun.ko
—
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGBF5XT4KL7JL3EPSGGJVLXZSU3BANCNFSM4M6WIWNA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm running a TUN.sh script that looks like this...
Running DSM7 on a DS418Play.... |
If you are using qBittorrentVPN with Synology DSM 7.x and want to set up a VPN, utilize this Docker Compose template:
|
Hi,
attempting to get VPN tunnel up. ovpn config downloaded from provider and added. Container running inside synology (docker version 18.09.0-0506). When openvpn starts fails with the following error.
2020-05-12 09:59:06 | stdout | Tue May 12 09:59:06 2020 ERROR: Cannot open TUN/TAP dev /dev/net/tun
2020-05-12 09:59:06 | stdout | Tue May 12 09:59:06 2020 Exiting due to fatal error
I've attempted to make the device file manually and then reboot but it looks as though it's re-created at each reboot and the file disappears. I am guessing it's a permissions issue according to the post I've read here
https://discuss.linuxcontainers.org/t/openvpn-error-cannot-open-tun-tap-dev-dev-net-tun-no-such-file-or-directory-errno-2-solved/1614/4
which can be resolved by adding some config into the container config file.
As I'm using these within a NAS i don't have the environment to pull and build directly otherwise I'd do some testing.
Anyway thought I'd flag it.
thanks
Adam
The text was updated successfully, but these errors were encountered: