-
-
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
Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19) #2883
Comments
I also had this issue, and found that passing through a /dev/net/tun device and setting CREATE_TUN_DEVICE=false at least works around the problem. My setup worked for years at this point, I suspect some docker change is relevant but couldn't find it. Notably, setting cap_add to ALL did not solve the problem. |
I also had this issue today, setting container to Privileged mode worked, but is not an actual solution. |
Also having the same issue, version 5.3.1, using NordVPN if providers matter in this instance is currently unclear. |
I'm also affected by this, but my error message is slightly different. I was unable to determine which of the many changes that |
|
Mine is already on Priviliged mode :/ |
Seeing the same with NORDVPN |
I was able to fix by adding
to my container config in my compose file |
Started happening to me too after pulling latest image. |
Same issue. I don't want to run the container in privileged mode, so I manually added the TUN device by including the following in the compose file. Hope this helps.
|
How can I do that on DSM 6.2.4 ? I looked for it, didn't found anything :( |
When I include the following in my docker-compose file:
I get the error:
However, if I set privileged: true, the error disappears. I would prefer to resolve the issue without granting Docker privileged access. If anyone has suggestions, I’d greatly appreciate your help. |
Share your compose file, this should work |
Thank you, this worked for me. Here's my entire compose Portainer stack for anyone interested:
|
I made a mistake and when I corrected my compose it worked. Thanks
|
I don't use DSM but you should be able to modify the docker compose to add it. |
Ich habe den gleichen Fehler: starting container with revision: 07f5a2b9aea5028c9bb75438c1552708e91dde71
TRANSMISSION_HOME is currently set to: /config/transmission-home
Creating TUN device /dev/net/tun
Using OpenVPN provider: CUSTOM
Running with VPN_CONFIG_SOURCE auto
CUSTOM provider specified but not using default.ovpn, will try to find a valid config mounted to /etc/openvpn/custom
Starting OpenVPN using config vpngate_92.124.161.186_udp_1809.ovpn
Modifying /etc/openvpn/custom/vpngate_92.124.161.186_udp_1809.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.0.0/24 via 172.19.0.1 dev eth0
2024-12-03 21:15:40 DEPRECATED OPTION: --cipher set to 'AES-128-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). Future OpenVPN version will ignore --cipher for cipher negotiations. Add 'AES-128-CBC' to --data-ciphers or change --cipher 'AES-128-CBC' to --data-ciphers-fallback 'AES-128-CBC' to silence this warning.
2024-12-03 21:15:40 OpenVPN 2.5.9 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 29 2023
2024-12-03 21:15:40 library versions: OpenSSL 3.0.2 15 Mar 2022, LZO 2.10
2024-12-03 21:15:40 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
2024-12-03 21:15:40 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2024-12-03 21:15:40 TCP/UDP: Preserving recently used remote address: [AF_INET]92.124.161.186:1809
2024-12-03 21:15:40 Socket Buffers: R=[212992->212992] S=[212992->212992]
2024-12-03 21:15:40 UDP link local: (not bound)
2024-12-03 21:15:40 UDP link remote: [AF_INET]92.124.161.186:1809
2024-12-03 21:15:40 TLS: Initial packet from [AF_INET]92.124.161.186:1809, sid=6727c523 2a8463ea
2024-12-03 21:15:40 VERIFY OK: depth=2, C=US, O=Internet Security Research Group, CN=ISRG Root X1
2024-12-03 21:15:40 VERIFY OK: depth=1, C=US, O=Let's Encrypt, CN=R11
2024-12-03 21:15:40 VERIFY OK: depth=0, CN=opengw.net
2024-12-03 21:15:40 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 2048 bit RSA, signature: RSA-SHA256
2024-12-03 21:15:40 [opengw.net] Peer Connection Initiated with [AF_INET]92.124.161.186:1809
2024-12-03 21:15:42 SENT CONTROL [opengw.net]: 'PUSH_REQUEST' (status=1)
2024-12-03 21:15:42 PUSH: Received control message: 'PUSH_REPLY,ping 3,ping-restart 10,ifconfig 10.211.1.29 10.211.1.30,dhcp-option DNS 10.211.254.254,dhcp-option DNS 8.8.8.8,route-gateway 10.211.1.30,redirect-gateway def1'
2024-12-03 21:15:42 OPTIONS IMPORT: timers and/or timeouts modified
2024-12-03 21:15:42 OPTIONS IMPORT: --ifconfig/up options modified
2024-12-03 21:15:42 OPTIONS IMPORT: route options modified
2024-12-03 21:15:42 OPTIONS IMPORT: route-related options modified
2024-12-03 21:15:42 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2024-12-03 21:15:42 Using peer cipher 'AES-128-CBC'
2024-12-03 21:15:42 Outgoing Data Channel: Cipher 'AES-128-CBC' initialized with 128 bit key
2024-12-03 21:15:42 Outgoing Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
2024-12-03 21:15:42 Incoming Data Channel: Cipher 'AES-128-CBC' initialized with 128 bit key
2024-12-03 21:15:42 Incoming Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
2024-12-03 21:15:42 net_route_v4_best_gw query: dst 0.0.0.0
2024-12-03 21:15:42 net_route_v4_best_gw result: via 172.19.0.1 dev eth0
2024-12-03 21:15:42 ROUTE_GATEWAY 172.19.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:13:00:02
2024-12-03 21:15:42 ERROR: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)
2024-12-03 21:15:42 Exiting due to fatal error |
@KnuffigerMaxi I had the same error. Fixed with #2883 (comment) |
I tried both privileged and devices
|
Just confirming that adding |
Thanks for the tip. I don't have a docker compose for this one, but use a service with this kind of command :
Does someone has the syntax to add |
Before the last line, add a line: |
you don't need the mapping inside the container if it is the same path, meaning
is sufficient. And it indeed solves the issue. The main issue is probably related to an update of container.io qdm12/gluetun#2606 |
so this broke... <haugene/docker-transmission-openvpn#2883> basically dependencies broke or something.. whatever this fixes it :D Signed-off-by: Matt Provost <[email protected]>
Is there a pinned issue for this?
Is there an existing or similar issue/discussion for this?
Is there any comment in the documentation for this?
Is this related to a provider?
Are you using the latest release?
Have you tried using the dev branch latest?
Docker run config used
I can't gather the docker command. All I see is
dumb-init /etc/openvpn/start.sh
, and the environment variables which I list below :Current Behavior
The container starts, and then fail at the TUN/TAP opening step
Expected Behavior
I just expect this works normaly :) I mean, this was the case just before this happens (and I actually don't know why). It worked very well just before.
How have you tried to solve the problem?
I tried to force stop the container, and start again.
Tried to stop de Docker package on DSM, and restart.
Checked updates, DSM and packages are all up to date.
Restarted my entire NAS, no change.
Log output
HW/SW Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: