Joentje / nordvpn-proxy

Use NordVPN in your Docker stack
141 stars 53 forks source link

Cannot open TUN/TAP dev /dev/net/tun: No such device #74

Open gkovacsp opened 3 years ago

gkovacsp commented 3 years ago

Describe the bug Container is not able to start, Errors out with the following remaining a contiuous start loop:

ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)

To Reproduce using docker CLI Full command needs to be provided (hide credentials)

docker run -d 
--cap-add=NET_ADMIN 
--device /dev/net/tun 
--name=vpn 
--dns=103.86.96.100 
--dns=103.86.99.100 
-e USERNAME=uname 
-e PASSWORD=pwd 
-e "LOCAL_NETWORK=192.168.1.0/24" 
-v /etc/localtime:/etc/localtime:ro 
-v /home/pi/docker-data/nordvpn/ovpn-data:/app/ovpn/config 
-p 8118:8118 
jeroenslot/nordvpn-proxy:latest 

I've added --device /dev/net/tun because it was suggested in one issue description, but the problem is the very same without it.

Expected behavior Container should start and conect to nordvpn

Logs

2021-10-09 16:44:23 INFO: Skipping downloading OVPN files - as they are not older than 120 minute(s).
2021-10-09 16:44:23 INFO: Removing current cronfile
2021-10-09 16:44:23 INFO: SERVER has not been set, choosing best for you.
2021-10-09 16:44:23 INFO: Your country setting will be used. This is set to: UK
2021-10-09 16:44:23 INFO: Creating new cronfile
2021-10-09 16:44:23 INFO: The country codes are unknown, getting country codes from API
2021-10-09 16:44:23 INFO: Your cron settings (*/15 * * * *) will be applied!
hu55.nordvpn.com

2021-10-09 16:44:25 INFO: Connection to server: Hungary #55
2021-10-09 16:44:25 INFO: Current load: 10
2021-10-09 16:44:25 INFO: Info updated at: 2021-10-09 14:41:12
2021-10-09 16:44:25 INFO: Server IP: 185.104.187.75
2021-10-09 16:44:25 INFO: Protocol: tcp

Sat Oct  9 16:44:25 2021 OpenVPN 2.4.11 armv7-alpine-linux-musleabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on May  4 2021
Sat Oct  9 16:44:25 2021 library versions: OpenSSL 1.1.1c  28 May 2019, LZO 2.10
Sat Oct  9 16:44:25 2021 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Sat Oct  9 16:44:25 2021 NOTE: --fast-io is disabled since we are not using UDP
Sat Oct  9 16:44:25 2021 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Oct  9 16:44:25 2021 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Oct  9 16:44:25 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]185.104.187.75:443
Sat Oct  9 16:44:25 2021 Socket Buffers: R=[131072->131072] S=[16384->16384]
Sat Oct  9 16:44:25 2021 Attempting to establish TCP connection with [AF_INET]185.104.187.75:443 [nonblock]
Sat Oct  9 16:44:26 2021 TCP connection established with [AF_INET]185.104.187.75:443
Sat Oct  9 16:44:26 2021 TCP_CLIENT link local: (not bound)
Sat Oct  9 16:44:26 2021 TCP_CLIENT link remote: [AF_INET]185.104.187.75:443
Sat Oct  9 16:44:26 2021 TLS: Initial packet from [AF_INET]185.104.187.75:443, sid=a035fac7 c30be802
Sat Oct  9 16:44:26 2021 VERIFY OK: depth=2, C=PA, O=NordVPN, CN=NordVPN Root CA
Sat Oct  9 16:44:26 2021 VERIFY OK: depth=1, C=PA, O=NordVPN, CN=NordVPN CA6
Sat Oct  9 16:44:26 2021 VERIFY KU OK
Sat Oct  9 16:44:26 2021 Validating certificate extended key usage
Sat Oct  9 16:44:26 2021 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sat Oct  9 16:44:26 2021 VERIFY EKU OK
Sat Oct  9 16:44:26 2021 VERIFY OK: depth=0, CN=hu55.nordvpn.com
Sat Oct  9 16:44:26 2021 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 4096 bit RSA
Sat Oct  9 16:44:26 2021 [hu55.nordvpn.com] Peer Connection Initiated with [AF_INET]185.104.187.75:443
Sat Oct  9 16:44:28 2021 SENT CONTROL [hu55.nordvpn.com]: 'PUSH_REQUEST' (status=1)
Sat Oct  9 16:44:28 2021 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 103.86.96.100,dhcp-option DNS 103.86.99.100,sndbuf 524288,rcvbuf 524288,explicit-exit-notify,comp-lzo no,route-gateway 10.7.3.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.7.3.3 255.255.255.0,peer-id 0,cipher AES-256-GCM'
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: timers and/or timeouts modified
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: --explicit-exit-notify can only be used with --proto udp
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: compression parms modified
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
Sat Oct  9 16:44:28 2021 Socket Buffers: R=[131072->360448] S=[44800->360448]
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: --ifconfig/up options modified
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: route options modified
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: route-related options modified
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: peer-id set
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: adjusting link_mtu to 1659
Sat Oct  9 16:44:28 2021 OPTIONS IMPORT: data channel crypto options modified
Sat Oct  9 16:44:28 2021 Data Channel: using negotiated cipher 'AES-256-GCM'
Sat Oct  9 16:44:28 2021 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Oct  9 16:44:28 2021 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Oct  9 16:44:28 2021 ROUTE_GATEWAY 172.17.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:11:00:08
Sat Oct  9 16:44:28 2021 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)
Sat Oct  9 16:44:28 2021 Exiting due to fatal error

Additional context Running on a Raspberry Pi 4

Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

Docker: Docker version 20.10.9, build c2ea9bc