Skip to content
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

OpenVPN error on network device Windows 10 22H2 x64 #38

Open
mdkberry opened this issue Feb 15, 2023 · 68 comments
Open

OpenVPN error on network device Windows 10 22H2 x64 #38

mdkberry opened this issue Feb 15, 2023 · 68 comments
Assignees
Labels
bug Something isn't working

Comments

@mdkberry
Copy link

(This was initially posted on the forum and a request was made to log it as a ticket here)

I am trying to use OpenVPN to access the ProtonVPN servers and following their instructions to set it up.

Protonvpn works on my machine by itself fine, but OpenVPN is giving me network error in the logs when trying to connect:

I followed your instructions on the forum as per below, but it hasnt resolved the issue yet. Though I had found a workaround which I am applying and then it works fine (disable the network adaptor with the issue)

Here is what I did as per request...

  1. Re-enabled the currently disabled network adaptor that was causing the issue (OpenVPN Data Channel Offload)

  2. Installed version OpenVPN-2.6.0-I004-amd64.msi to Windows 10 x64

  3. But then I realised hadnt run it using the logging method requested, so removed it and then ran it again using
    "msiexec /i OpenVPN-2.6.0-I004-amd64.msi /L*V log.txt"

  4. sourced C:\Windows\INF\setupapi.dev.log

  5. tested OpenVPN and same problem if OpenVPN Data Channel Offload (ROOT#NET#0004#) network adaptor is left enabled, copy of connection log for the attempt that failed is here:

"2023-02-16 07:23:35 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). OpenVPN ignores --cipher for cipher negotiations.
2023-02-16 07:23:35 OpenVPN 2.6.0 [git:v2.6.0/b999466418dddb89] Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Feb 6 2023
2023-02-16 07:23:35 Windows version 10.0 (Windows 10 or greater), amd64 executable
2023-02-16 07:23:35 library versions: OpenSSL 3.0.7 1 Nov 2022, LZO 2.10
2023-02-16 07:23:35 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25341
2023-02-16 07:23:35 Need hold release from management interface, waiting...
2023-02-16 07:23:35 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:49587
2023-02-16 07:23:35 MANAGEMENT: CMD 'state on'
2023-02-16 07:23:35 MANAGEMENT: CMD 'log on all'
2023-02-16 07:23:35 MANAGEMENT: CMD 'echo on all'
2023-02-16 07:23:35 MANAGEMENT: CMD 'bytecount 5'
2023-02-16 07:23:35 MANAGEMENT: CMD 'state'
2023-02-16 07:23:35 MANAGEMENT: CMD 'hold off'
2023-02-16 07:23:35 MANAGEMENT: CMD 'hold release'
2023-02-16 07:23:37 MANAGEMENT: CMD 'username "Auth" "xxxxxxxx"'
2023-02-16 07:23:37 MANAGEMENT: CMD 'password [...]'
2023-02-16 07:23:37 NOTE: --fast-io is disabled since we are running on Windows
2023-02-16 07:23:37 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
2023-02-16 07:23:37 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
2023-02-16 07:23:37 TCP/UDP: Preserving recently used remote address: [AF_INET]185.107.95.209:443
2023-02-16 07:23:37 CreateFile failed on ovpn-dco device: \?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2023-02-16 07:23:37 MANAGEMENT: Client disconnected
2023-02-16 07:23:37 All ovpn-dco adapters on this system are currently in use or disabled.
2023-02-16 07:23:37 Exiting due to fatal error

  1. Even though network adaptors have changed position in the windows list, checking through their details I find ROOT#NET#0004# is the "OpenVPN Data Channel Offload" adaptor still. Disabling it allows OpenVPN to connect and function. The below is the log after a successful connection is established once I disabled the adaptor:

"

2023-02-16 07:28:55 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). OpenVPN ignores --cipher for cipher negotiations.
2023-02-16 07:28:55 Note: ovpn-dco-win driver is missing, disabling data channel offload.
2023-02-16 07:28:55 OpenVPN 2.6.0 [git:v2.6.0/b999466418dddb89] Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Feb 6 2023
2023-02-16 07:28:55 Windows version 10.0 (Windows 10 or greater), amd64 executable
2023-02-16 07:28:55 library versions: OpenSSL 3.0.7 1 Nov 2022, LZO 2.10
2023-02-16 07:28:55 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25341
2023-02-16 07:28:55 Need hold release from management interface, waiting...
2023-02-16 07:28:55 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:49745
2023-02-16 07:28:56 MANAGEMENT: CMD 'state on'
2023-02-16 07:28:56 MANAGEMENT: CMD 'log on all'
2023-02-16 07:28:56 MANAGEMENT: CMD 'echo on all'
2023-02-16 07:28:56 MANAGEMENT: CMD 'bytecount 5'
2023-02-16 07:28:56 MANAGEMENT: CMD 'state'
2023-02-16 07:28:56 MANAGEMENT: CMD 'hold off'
2023-02-16 07:28:56 MANAGEMENT: CMD 'hold release'
2023-02-16 07:28:57 MANAGEMENT: CMD 'username "Auth" "xxxxxxx"'
2023-02-16 07:28:57 MANAGEMENT: CMD 'password [...]'
2023-02-16 07:28:57 NOTE: --fast-io is disabled since we are running on Windows
2023-02-16 07:28:57 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
2023-02-16 07:28:57 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
2023-02-16 07:28:57 TCP/UDP: Preserving recently used remote address: [AF_INET]185.107.95.209:7770
2023-02-16 07:28:57 Socket Buffers: R=[65536->65536] S=[65536->65536]
2023-02-16 07:28:57 Attempting to establish TCP connection with [AF_INET]185.107.95.209:7770
2023-02-16 07:28:57 MANAGEMENT: >STATE:1676496537,TCP_CONNECT,,,,,,
2023-02-16 07:28:57 TCP connection established with [AF_INET]185.107.95.209:7770
2023-02-16 07:28:57 TCPv4_CLIENT link local: (not bound)
2023-02-16 07:28:57 TCPv4_CLIENT link remote: [AF_INET]185.107.95.209:7770
2023-02-16 07:28:57 MANAGEMENT: >STATE:1676496537,WAIT,,,,,,
2023-02-16 07:28:58 MANAGEMENT: >STATE:1676496538,AUTH,,,,,,
2023-02-16 07:28:58 TLS: Initial packet from [AF_INET]185.107.95.209:7770, sid=fdf43217 bf2327bf
2023-02-16 07:28:58 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-02-16 07:28:59 VERIFY OK: depth=2, C=CH, O=ProtonVPN AG, CN=ProtonVPN Root CA
2023-02-16 07:28:59 VERIFY OK: depth=1, C=CH, O=ProtonVPN AG, CN=ProtonVPN Intermediate CA 1
2023-02-16 07:28:59 VERIFY KU OK
2023-02-16 07:28:59 Validating certificate extended key usage
2023-02-16 07:28:59 ++ Certificate has EKU (str) TLS Web Client Authentication, expects TLS Web Server Authentication
2023-02-16 07:28:59 ++ Certificate has EKU (oid) 1.3.6.1.5.5.7.3.2, expects TLS Web Server Authentication
2023-02-16 07:28:59 ++ Certificate has EKU (str) 1.3.6.1.5.5.8.2.2, expects TLS Web Server Authentication
2023-02-16 07:28:59 ++ Certificate has EKU (oid) 1.3.6.1.5.5.8.2.2, expects TLS Web Server Authentication
2023-02-16 07:28:59 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-02-16 07:28:59 VERIFY EKU OK
2023-02-16 07:28:59 VERIFY OK: depth=0, CN=node-nl-20.protonvpn.net
2023-02-16 07:28:59 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-02-16 07:28:59 [node-nl-20.protonvpn.net] Peer Connection Initiated with [AF_INET]185.107.95.209:7770
2023-02-16 07:28:59 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-02-16 07:28:59 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-02-16 07:29:00 MANAGEMENT: >STATE:1676496540,GET_CONFIG,,,,,,
2023-02-16 07:29:00 SENT CONTROL [node-nl-20.protonvpn.net]: 'PUSH_REQUEST' (status=1)
2023-02-16 07:29:00 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 10.83.0.1,redirect-gateway def1,explicit-exit-notify,comp-lzo no,route-gateway 10.83.0.1,topology subnet,ping 10,ping-restart 60,socket-flags TCP_NODELAY,ifconfig 10.83.0.7 255.255.0.0,peer-id 0,cipher AES-256-GCM'
2023-02-16 07:29:00 OPTIONS IMPORT: timers and/or timeouts modified
2023-02-16 07:29:00 OPTIONS IMPORT: --explicit-exit-notify can only be used with --proto udp
2023-02-16 07:29:00 OPTIONS IMPORT: compression parms modified
2023-02-16 07:29:00 OPTIONS IMPORT: --socket-flags option modified
2023-02-16 07:29:00 OPTIONS IMPORT: --ifconfig/up options modified
2023-02-16 07:29:00 OPTIONS IMPORT: route options modified
2023-02-16 07:29:00 OPTIONS IMPORT: route-related options modified
2023-02-16 07:29:00 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-02-16 07:29:00 OPTIONS IMPORT: peer-id set
2023-02-16 07:29:00 OPTIONS IMPORT: data channel crypto options modified
2023-02-16 07:29:00 interactive service msg_channel=464
2023-02-16 07:29:00 open_tun
2023-02-16 07:29:00 tap-windows6 device [OpenVPN TAP-Windows6] opened
2023-02-16 07:29:00 TAP-Windows Driver Version 9.24
2023-02-16 07:29:00 Set TAP-Windows TUN subnet mode network/local/netmask = 10.83.0.0/10.83.0.7/255.255.0.0 [SUCCEEDED]
2023-02-16 07:29:00 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.83.0.7/255.255.0.0 on interface {16D5FAA5-B104-4F89-8481-B67667876A39} [DHCP-serv: 10.83.0.0, lease-time: 31536000]
2023-02-16 07:29:00 Successful ARP Flush on interface [16] {16D5FAA5-B104-4F89-8481-B67667876A39}
2023-02-16 07:29:00 MANAGEMENT: >STATE:1676496540,ASSIGN_IP,,10.83.0.7,,,,
2023-02-16 07:29:00 IPv4 MTU set to 1500 on interface 16 using service
2023-02-16 07:29:00 Blocking outside dns using service succeeded.
2023-02-16 07:29:00 Data Channel: using negotiated cipher 'AES-256-GCM'
2023-02-16 07:29:00 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2023-02-16 07:29:00 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2023-02-16 07:29:05 TEST ROUTES: 0/0 succeeded len=-1 ret=0 a=0 u/d=down
2023-02-16 07:29:05 Route: Waiting for TUN/TAP interface to come up...
2023-02-16 07:29:06 TEST ROUTES: 0/0 succeeded len=-1 ret=0 a=0 u/d=down
2023-02-16 07:29:06 Route: Waiting for TUN/TAP interface to come up...
2023-02-16 07:29:07 TEST ROUTES: 0/0 succeeded len=-1 ret=0 a=0 u/d=down
2023-02-16 07:29:07 Route: Waiting for TUN/TAP interface to come up...
2023-02-16 07:29:08 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
2023-02-16 07:29:08 C:\Windows\system32\route.exe ADD 185.107.95.209 MASK 255.255.255.255 192.168.88.254
2023-02-16 07:29:08 Route addition via service succeeded
2023-02-16 07:29:08 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.83.0.1
2023-02-16 07:29:08 Route addition via service succeeded
2023-02-16 07:29:08 C:\Windows\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.83.0.1
2023-02-16 07:29:08 Route addition via service succeeded
2023-02-16 07:29:08 Initialization Sequence Completed
2023-02-16 07:29:08 MANAGEMENT: >STATE:1676496548,CONNECTED,SUCCESS,10.83.0.7,185.107.95.209,7770,192.168.88.168,49746

  1. I had a quick check through both attached logs for privacy issues and removed password/username data where I found it. If I have left something in there which should not be revealed, please let me know.

OpenVPN install log.txt
setupapi.dev.log

@lstipakov
Copy link
Member

Hi @mdkberry,

I checked the logs and so far I could not spot anything wrong. I need to get more data, could you please:

  • Install 2.6.0-I005 - it has some tweaks to the driver which might help
  • Replace your C:\Program Files\OpenVPN\bin\openvpn.exe with the one from this artifacts bundle - I added some additional logging to the adapter selection logic
  • Set verb 6 in your .ovpn profile to enable that additional logging
  • Enable driver logs at boot - run this reg file on your machine
  • Reboot
  • Reproduce the problem
  • Provide me openvpn log and driver log, which will appear at C:\Windows\System32\LogFiles\WMI\ovpn-dco.etl

@Makin-Things
Copy link

I am getting a similar error using 2.6.2. My scenario is possibly a little different though. I have a persistent vpn connection configured which works perfectly, but I sometime need to open a second vpn connection manually using the gui client. When I do this I get this log.

2023-04-04 09:24:04 OpenVPN 2.6.2 [git:v2.6.2/3577442530eb7830] Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Mar 24 2023
2023-04-04 09:24:04 Windows version 10.0 (Windows 10 or greater), amd64 executable
2023-04-04 09:24:04 library versions: OpenSSL 3.0.8 7 Feb 2023, LZO 2.10
2023-04-04 09:24:04 DCO version: v0
2023-04-04 09:24:08 TCP/UDP: Preserving recently used remote address: [AF_INET]X.X.X.X:1194
2023-04-04 09:24:08 All ovpn-dco adapters on this system are currently in use or disabled.
2023-04-04 09:24:08 Exiting due to fatal error

The manual connection works if I stop the OpenVPNService service.

Is there a way to get this to work or is it a limitation of the ovpn-dco-win driver?

@lstipakov
Copy link
Member

Hi @Makin-Things ,

I sometime need to open a second vpn connection

If you need to open a second VPN connection, you need to create an additional DCO adapter. You should have a shortcut in your Start menu Add a new dco-win virtual network adapter.
Näyttökuva 2023-04-04 093650

@Makin-Things
Copy link

And now I feel really stupid, but no amount of googling gave me that solution. tbh I didn't think to look for other stuff in the start menu, but just the gui menus. Possibly a doco/faq update to add that?
Thank you.

@lstipakov
Copy link
Member

You are right, this should be better communicated to users. As a minimum a better error message explaining what to do. The ultimate solution would be to create adapters on demand in this case.

@Makin-Things
Copy link

On demand would be awesome.
Also, sorry for hijacking what I thought was a related issue when it turns out it definitely wasn't.

@R-Studio
Copy link

R-Studio commented May 1, 2023

Hi @Makin-Things ,

I sometime need to open a second vpn connection

If you need to open a second VPN connection, you need to create an additional DCO adapter. You should have a shortcut in your Start menu Add a new dco-win virtual network adapter. Näyttökuva 2023-04-04 093650

I have the same issue but unfotunately one or multiple new dco-win adapters not help. 😖
I have Windows 11 (22H2).

@lstipakov
Copy link
Member

lstipakov commented May 1, 2023 via email

@R-Studio
Copy link

R-Studio commented May 2, 2023

@lstipakov not much:

2023-05-02 07:54:01 OpenVPN 2.6.3 [git:v2.6.3/94aad8c51043a805] Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Apr 26 2023
2023-05-02 07:54:01 Windows version 10.0 (Windows 10 or greater), amd64 executable
2023-05-02 07:54:01 library versions: OpenSSL 3.1.0 14 Mar 2023, LZO 2.10
2023-05-02 07:54:01 DCO version: v0
2023-05-02 07:54:03 TCP/UDP: Preserving recently used remote address: [AF_INET]xx.xx.xxx.xxx:xxxx
2023-05-02 07:54:03 All ovpn-dco adapters on this system are currently in use or disabled.
2023-05-02 07:54:03 Exiting due to fatal error

@lstipakov
Copy link
Member

I cannot reproduce this - just tried two simultaneous DCO connection. Could you past log with verb 6? Here is my logs for the second connection:

2023-05-02 09:34:55 us=93000 OpenVPN 2.6.3 [git:unknown/unknown] Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on May  1 2023
2023-05-02 09:34:55 us=93000 Windows version 10.0 (Windows 10 or greater), amd64 executable
2023-05-02 09:34:55 us=93000 library versions: OpenSSL 3.1.0 14 Mar 2023, LZO 2.10
2023-05-02 09:34:55 us=93000 DCO version: v0
2023-05-02 09:34:55 us=93000 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25373
2023-05-02 09:34:55 us=93000 Need hold release from management interface, waiting...
2023-05-02 09:34:55 us=593000 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:64367
2023-05-02 09:34:55 us=718000 MANAGEMENT: CMD 'state on'
2023-05-02 09:34:55 us=718000 MANAGEMENT: CMD 'log on all'
2023-05-02 09:34:56 us=15000 MANAGEMENT: CMD 'echo on all'
2023-05-02 09:34:56 us=15000 MANAGEMENT: CMD 'bytecount 5'
2023-05-02 09:34:56 us=15000 MANAGEMENT: CMD 'state'
2023-05-02 09:34:56 us=31000 MANAGEMENT: CMD 'hold off'
2023-05-02 09:34:56 us=31000 MANAGEMENT: CMD 'hold release'
2023-05-02 09:34:56 us=31000 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
2023-05-02 09:34:56 us=31000 Control Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1250 tun_max_mtu:0 headroom:126 payload:1600 tailroom:126 ET:0 ]
2023-05-02 09:34:56 us=31000 Data Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]
2023-05-02 09:34:56 us=31000 TCP/UDP: Preserving recently used remote address: [AF_INET]aaa.bbb.ccc.ddd:1194
2023-05-02 09:34:56 us=31000 Enumerate drivers in registy: 
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {6C0B8124-3335-4925-A358-5A8F7D7594CA}, Driver: ovpn-dco
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {5760F0EC-DB24-4CF7-864A-88D62446027B}, Driver: wintun
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {64668BCF-6456-420F-81A4-752A724C0B52}, Driver: tap-windows6
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {FF4BDA60-579A-4F5A-A9A8-9ACB1ECD341E}, Driver: ovpn-dco
2023-05-02 09:34:56 us=31000 Enumerate device interface lists:
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {CFE28319-61B5-44AE-9EB6-9296DC727BC9}, Device Interface: \\?\SWD#MSRRAS#MS_PPPOEMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {42B45AA7-2361-470E-8D91-1FD167770BEF}, Device Interface: \\?\ROOT#VMS_VSMP#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {6C0B8124-3335-4925-A358-5A8F7D7594CA}, Device Interface: \\?\ROOT#NET#0000#{cac88484-7515-4c03-82e6-71a87abac361}\{6C0B8124-3335-4925-A358-5A8F7D7594CA}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {6C0B8124-3335-4925-A358-5A8F7D7594CA}, Device Interface: \\?\ROOT#NET#0000#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {5760F0EC-DB24-4CF7-864A-88D62446027B}, Device Interface: \\?\ROOT#NET#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {0E0DE525-9C73-4961-9AC8-3A15EA5AB631}, Device Interface: \\?\SWD#MSRRAS#MS_PPTPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {1D5B0428-FC73-4044-B17F-330F3CD45D2C}, Device Interface: \\?\SWD#MSRRAS#MS_AGILEVPNMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {B1BBBC18-CAD2-4588-A513-D85C9FAB9218}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANBH#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {FD4DC00B-C4F9-4586-AECE-EE02E0ECD53A}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANIP#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {E4528C43-B149-4FDB-A633-AAF86B754F29}, Device Interface: \\?\SWD#MSRRAS#MS_SSTPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {73D1BFE4-63A4-40CE-A7D1-81DCDCD83107}, Device Interface: \\?\PCI#VEN_8086&DEV_24FD&SUBSYS_00108086&REV_78#84FDD1FFFFE81E6C00#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {DB30EF69-31D1-4DD8-893F-8D941E6CBCA2}, Device Interface: \\?\PCI#VEN_8086&DEV_15D8&SUBSYS_225C17AA&REV_21#3&11583659&1&FE#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {2960E1E9-3251-41E6-A5A8-789C415C0F45}, Device Interface: \\?\ROOT#VMS_MP#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {1897FA47-7457-423B-9537-AAB2B4B73D4E}, Device Interface: \\?\{5d624f94-8850-40c3-a3fa-a4fd2080baf3}#vwifimp_wfd#5&3a2dc7ac&1&11#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {35AA0192-5433-49C6-86AF-9D09C96ACBAF}, Device Interface: \\?\{5d624f94-8850-40c3-a3fa-a4fd2080baf3}#vwifimp_wfd#5&3a2dc7ac&1&12#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {01CA972F-2E92-4483-AF0F-972085D03C4A}, Device Interface: \\?\BTH#MS_BTHPAN#6&2d9163f5&0&2#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {24E93F33-5286-4BE7-BC72-69A11285CAF2}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANIPV6#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {257B89AE-3B56-4CB5-AE57-EF68DC0ECE40}, Device Interface: \\?\SWD#MSRRAS#MS_L2TPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {0CAC02BE-811D-4553-B988-E19257437AB8}, Device Interface: \\?\ROOT#VMS_VSMP#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {230CA413-C39E-42C4-9238-CE5C1E2235E6}, Device Interface: \\?\ROOT#VMS_MP#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {C4BFB002-A1B7-4470-9601-5AA4BAD02E49}, Device Interface: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {64668BCF-6456-420F-81A4-752A724C0B52}, Device Interface: \\?\ROOT#NET#0002#{cac88484-7515-4c03-82e6-71a87abac361}
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {FF4BDA60-579A-4F5A-A9A8-9ACB1ECD341E}, Device Interface: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2023-05-02 09:34:56 us=31000 NetCfgInstanceId: {FF4BDA60-579A-4F5A-A9A8-9ACB1ECD341E}, Device Interface: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}\{FF4BDA60-579A-4F5A-A9A8-9ACB1ECD341E}
2023-05-02 09:34:56 us=31000 Using device interface: \\?\ROOT#NET#0000#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2023-05-02 09:34:56 us=46000 CreateFile failed on ovpn-dco device: \\?\ROOT#NET#0000#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco: Access is denied.   (errno=5)
2023-05-02 09:34:56 us=46000 Using device interface: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2023-05-02 09:34:56 us=46000 ovpn-dco device [Local Area Connection 4] opened
2023-05-02 09:34:56 us=46000 dco_create_socket
2023-05-02 09:34:56 us=46000 UDP link local: (not bound)
2023-05-02 09:34:56 us=46000 UDP link remote: [AF_INET]aaa.bbb.ccc.ddd:1194
2023-05-02 09:34:56 us=46000 MANAGEMENT: >STATE:1683009296,WAIT,,,,,,
2023-05-02 09:34:56 us=46000 UDP WRITE [14] to [AF_INET]aaa.bbb.ccc.ddd:1194: P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 [ ] pid=0 DATA len=0

After trying and failing device \\?\ROOT#NET#0000, openvpn tries and succeeds with \\?\ROOT#NET#0004.

@R-Studio
Copy link

Any news?

@lstipakov
Copy link
Member

Please try the latest release (2.6.4) with verb 6 logs.

@ams-tschoening
Copy link

[...]The ultimate solution would be to create adapters on demand in this case.

Beware that some users maintain tunnels manually using the GUI only and with restricted permissions under Windows as non-admin. One can't easily add new interfaces in such cases unless it's done by the interactive service or stuff. Additionally, it seems that the OpenVPN MSI creates some usefully names OpenVPN Data Channel Offload, while your mentioned shortcut and the called tapctl.exe create --hwid ovpn-dco seems to create new interfaces with pretty bad generic names, e.g. LAN-Verbindung 2 in German language. If OpenVPN really creates many of these somewhat generic named interfaces, it might be difficult to know which was created why and used for what.

How does OpenVPN decide which DCO to use at all? It seems to simply try the existing ones in order? I have multiple tunnels configured and all have their own individually named interface, but --dev-node is ignored when DCO is available. Is something like that available to assign one DCO interface to one concrete tunnel config or do I need to think in DCO interface pools instead? I additionally have one TAP-based VPN for which Windows' interface I configured a pretty low metric directly in the Windows GUI settings, simply because of the 1:1 mapping. Things like these wouldn't be possible anymore with some pool-approach.

image

@lstipakov
Copy link
Member

Beware that some users maintain tunnels manually using the GUI only and with restricted permissions under Windows as non-admin. One can't easily add new interfaces in such cases unless it's done by the interactive service or stuff.

Yeah, interactive service would be a one way to do it. A simpler solution would be to call tapctl, which due to manifest prompts for elevation, but that won't work for users without admin access or non-interactive connections.

Additionally, it seems that the OpenVPN MSI creates some usefully names OpenVPN Data Channel Offload, while your mentioned shortcut and the called tapctl.exe create --hwid ovpn-dco seems to create new interfaces with pretty bad generic names, e.g. LAN-Verbindung 2 in German language. If OpenVPN really creates many of these somewhat generic named interfaces, it might be difficult to know which was created why and used for what.

Right. Probably tapctl could be a little smarter and, if no name is given, use driver-specific name and some random suffix at the end?

How does OpenVPN decide which DCO to use at all? It seems to simply try the existing ones in order?

Assuming profile options are compatible, OpenVPN uses DCO by default starting from 2.6. If no DCO adapters are available, connection will fail.

I have multiple tunnels configured and all have their own individually named interface, but --dev-node is ignored when DCO is available. Is something like that available to assign one DCO interface to one concrete tunnel config or do I need to think in DCO interface pools instead?

I have to admit I haven't tested --dev-node with DCO, so no surprise it doesn't work. Right now you may want to think of DCO interface pools.

I additionally have one TAP-based VPN for which Windows' interface I configured a pretty low metric directly in the Windows GUI settings, simply because of the 1:1 mapping. Things like these wouldn't be possible anymore with some pool-approach.

Right. Maybe we should indeed add --dev-node support for DCO.

@ams-tschoening
Copy link

Right. Probably tapctl could be a little smarter and, if no name is given, use driver-specific name and some random suffix at the end?

Windows seems to generate some name as well already for each new device, which might be reused. 1:1 or without the # or something like that.

image

@cron2
Copy link

cron2 commented May 17, 2023

+1 on --dev-node support for DCO interfaces. Naively I had expected this to "just work" as part of device/driver search...

@lstipakov
Copy link
Member

Right. Probably tapctl could be a little smarter and, if no name is given, use driver-specific name and some random suffix at the end?

Windows seems to generate some name as well already for each new device, which might be reused. 1:1 or without the # or something like that.

image

My understanding is that those are device descriptions, taken from .inf file, with #x added at the end. We probably want a better naming for adapters in "Network Connections" window:
Capture

@ams-tschoening
Copy link

My understanding is that those are device descriptions, taken from .inf file, with #x added at the end. We probably want a better naming for adapters in "Network Connections" window:

Exactly, but one approach might be to simply use the device descriptions already generated by Windows itself. I'm simply following that naming scheme myself right now, because it's somewhat easy to understand and the MSI creates the same name for the first device.

image

@cescarsega
Copy link

I'm getting this same error as well. Is there any fix? Out of nowhere I'm unable to connect to my VPNs...

@lstipakov
Copy link
Member

Please provide the log file with verb 6.

@R-Studio
Copy link

R-Studio commented Nov 7, 2023

I get the same error message and have no solution for it. So I am still using the TAP-Windows adapters.

@lstipakov
Copy link
Member

@R-Studio as I asked above, please paste the log with verb 6.

@R-Studio
Copy link

R-Studio commented Nov 7, 2023

@lstipakov I have no option or I don't know how to change the verbosity:
image

@lstipakov
Copy link
Member

You need to add verb 6 to your .ovpn profile. I believe it is Konfiguration ändern in your localization.
Näyttökuva 2023-11-07 112016

@R-Studio
Copy link

R-Studio commented Nov 7, 2023

Here the log output with verbosity 6:

2023-11-07 11:44:27 us=531000 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations. 
2023-11-07 11:44:27 us=531000 Current Parameter Settings:
2023-11-07 11:44:27 us=531000   config = '<REDACTED>.ovpn'
2023-11-07 11:44:27 us=531000   mode = 0
2023-11-07 11:44:27 us=531000   show_ciphers = DISABLED
2023-11-07 11:44:27 us=531000   show_digests = DISABLED
2023-11-07 11:44:27 us=531000   show_engines = DISABLED
2023-11-07 11:44:27 us=531000   genkey = DISABLED
2023-11-07 11:44:27 us=531000   genkey_filename = '[UNDEF]'
2023-11-07 11:44:27 us=531000   key_pass_file = '[UNDEF]'
2023-11-07 11:44:27 us=531000   show_tls_ciphers = DISABLED
2023-11-07 11:44:27 us=531000   connect_retry_max = 0
2023-11-07 11:44:27 us=531000 Connection profiles [0]:
2023-11-07 11:44:27 us=531000   proto = udp
2023-11-07 11:44:27 us=531000   local = '[UNDEF]'
2023-11-07 11:44:27 us=531000   local_port = '0'
2023-11-07 11:44:27 us=531000   remote = '<REDACTED>'
2023-11-07 11:44:27 us=531000   remote_port = '<REDACTED>'
2023-11-07 11:44:27 us=531000   remote_float = DISABLED
2023-11-07 11:44:27 us=531000   bind_defined = DISABLED
2023-11-07 11:44:27 us=531000   bind_local = ENABLED
2023-11-07 11:44:27 us=531000   bind_ipv6_only = DISABLED
2023-11-07 11:44:27 us=531000   connect_retry_seconds = 1
2023-11-07 11:44:27 us=531000   connect_timeout = 120
2023-11-07 11:44:27 us=546000   socks_proxy_server = '[UNDEF]'
2023-11-07 11:44:27 us=546000   socks_proxy_port = '[UNDEF]'
2023-11-07 11:44:27 us=546000   tun_mtu = 1500
2023-11-07 11:44:27 us=546000   tun_mtu_defined = ENABLED
2023-11-07 11:44:27 us=546000   link_mtu = 1500
2023-11-07 11:44:27 us=546000   link_mtu_defined = DISABLED
2023-11-07 11:44:27 us=546000   tun_mtu_extra = 0
2023-11-07 11:44:27 us=546000   tun_mtu_extra_defined = DISABLED
2023-11-07 11:44:27 us=546000   tls_mtu = 1250
2023-11-07 11:44:27 us=546000   mtu_discover_type = -1
2023-11-07 11:44:27 us=546000   fragment = 0
2023-11-07 11:44:27 us=546000   mssfix = 1492
2023-11-07 11:44:27 us=546000   mssfix_encap = ENABLED
2023-11-07 11:44:27 us=546000   mssfix_fixed = DISABLED
2023-11-07 11:44:27 us=546000   explicit_exit_notification = 0
2023-11-07 11:44:27 us=546000   tls_auth_file = '[INLINE]'
2023-11-07 11:44:27 us=546000   key_direction = 1
2023-11-07 11:44:27 us=546000   tls_crypt_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   tls_crypt_v2_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000 Connection profiles END
2023-11-07 11:44:27 us=546000   remote_random = DISABLED
2023-11-07 11:44:27 us=546000   ipchange = '[UNDEF]'
2023-11-07 11:44:27 us=546000   dev = 'tun'
2023-11-07 11:44:27 us=546000   dev_type = '[UNDEF]'
2023-11-07 11:44:27 us=546000   dev_node = '[UNDEF]'
2023-11-07 11:44:27 us=546000   tuntap_options.disable_dco = DISABLED
2023-11-07 11:44:27 us=546000   lladdr = '[UNDEF]'
2023-11-07 11:44:27 us=546000   topology = 1
2023-11-07 11:44:27 us=546000   ifconfig_local = '[UNDEF]'
2023-11-07 11:44:27 us=546000   ifconfig_remote_netmask = '[UNDEF]'
2023-11-07 11:44:27 us=546000   ifconfig_noexec = DISABLED
2023-11-07 11:44:27 us=546000   ifconfig_nowarn = DISABLED
2023-11-07 11:44:27 us=546000   ifconfig_ipv6_local = '[UNDEF]'
2023-11-07 11:44:27 us=546000   ifconfig_ipv6_netbits = 0
2023-11-07 11:44:27 us=546000   ifconfig_ipv6_remote = '[UNDEF]'
2023-11-07 11:44:27 us=546000   shaper = 0
2023-11-07 11:44:27 us=546000   mtu_test = 0
2023-11-07 11:44:27 us=546000   mlock = DISABLED
2023-11-07 11:44:27 us=546000   keepalive_ping = 0
2023-11-07 11:44:27 us=546000   keepalive_timeout = 0
2023-11-07 11:44:27 us=546000   inactivity_timeout = 0
2023-11-07 11:44:27 us=546000   session_timeout = 0
2023-11-07 11:44:27 us=546000   inactivity_minimum_bytes = 0
2023-11-07 11:44:27 us=546000   ping_send_timeout = 0
2023-11-07 11:44:27 us=546000   ping_rec_timeout = 0
2023-11-07 11:44:27 us=546000   ping_rec_timeout_action = 0
2023-11-07 11:44:27 us=546000   ping_timer_remote = DISABLED
2023-11-07 11:44:27 us=546000   remap_sigusr1 = 0
2023-11-07 11:44:27 us=546000   persist_tun = ENABLED
2023-11-07 11:44:27 us=546000   persist_local_ip = DISABLED
2023-11-07 11:44:27 us=546000   persist_remote_ip = DISABLED
2023-11-07 11:44:27 us=546000   persist_key = ENABLED
2023-11-07 11:44:27 us=546000   passtos = DISABLED
2023-11-07 11:44:27 us=546000   resolve_retry_seconds = 1000000000
2023-11-07 11:44:27 us=546000   resolve_in_advance = DISABLED
2023-11-07 11:44:27 us=546000   username = '[UNDEF]'
2023-11-07 11:44:27 us=546000   groupname = '[UNDEF]'
2023-11-07 11:44:27 us=546000   chroot_dir = '[UNDEF]'
2023-11-07 11:44:27 us=546000   cd_dir = '[UNDEF]'
2023-11-07 11:44:27 us=546000   writepid = '[UNDEF]'
2023-11-07 11:44:27 us=546000   up_script = '[UNDEF]'
2023-11-07 11:44:27 us=546000   down_script = '[UNDEF]'
2023-11-07 11:44:27 us=546000   down_pre = DISABLED
2023-11-07 11:44:27 us=546000   up_restart = DISABLED
2023-11-07 11:44:27 us=546000   up_delay = DISABLED
2023-11-07 11:44:27 us=546000   daemon = DISABLED
2023-11-07 11:44:27 us=546000   log = ENABLED
2023-11-07 11:44:27 us=546000   suppress_timestamps = DISABLED
2023-11-07 11:44:27 us=546000   machine_readable_output = DISABLED
2023-11-07 11:44:27 us=546000   nice = 0
2023-11-07 11:44:27 us=546000   verbosity = 6
2023-11-07 11:44:27 us=546000   mute = 0
2023-11-07 11:44:27 us=546000   status_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   status_file_version = 1
2023-11-07 11:44:27 us=546000   status_file_update_freq = 60
2023-11-07 11:44:27 us=546000   occ = ENABLED
2023-11-07 11:44:27 us=546000   rcvbuf = 0
2023-11-07 11:44:27 us=546000   sndbuf = 0
2023-11-07 11:44:27 us=546000   sockflags = 0
2023-11-07 11:44:27 us=546000   fast_io = DISABLED
2023-11-07 11:44:27 us=546000   comp.alg = 0
2023-11-07 11:44:27 us=546000   comp.flags = 152
2023-11-07 11:44:27 us=546000   route_script = '[UNDEF]'
2023-11-07 11:44:27 us=546000   route_default_gateway = '[UNDEF]'
2023-11-07 11:44:27 us=546000   route_default_metric = 0
2023-11-07 11:44:27 us=546000   route_noexec = DISABLED
2023-11-07 11:44:27 us=546000   route_delay = 0
2023-11-07 11:44:27 us=546000   route_delay_window = 30
2023-11-07 11:44:27 us=546000   route_delay_defined = DISABLED
2023-11-07 11:44:27 us=546000   route_nopull = DISABLED
2023-11-07 11:44:27 us=546000   route_gateway_via_dhcp = DISABLED
2023-11-07 11:44:27 us=546000   allow_pull_fqdn = DISABLED
2023-11-07 11:44:27 us=546000   Pull filters:
2023-11-07 11:44:27 us=546000     ignore "route-method"
2023-11-07 11:44:27 us=546000   management_addr = '127.0.0.1'
2023-11-07 11:44:27 us=546000   management_port = '25341'
2023-11-07 11:44:27 us=546000   management_user_pass = 'stdin'
2023-11-07 11:44:27 us=546000   management_log_history_cache = 250
2023-11-07 11:44:27 us=546000   management_echo_buffer_size = 100
2023-11-07 11:44:27 us=546000   management_client_user = '[UNDEF]'
2023-11-07 11:44:27 us=546000   management_client_group = '[UNDEF]'
2023-11-07 11:44:27 us=546000   management_flags = 6
2023-11-07 11:44:27 us=546000   shared_secret_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   key_direction = 1
2023-11-07 11:44:27 us=546000   ciphername = 'AES-256-CBC'
2023-11-07 11:44:27 us=546000   ncp_ciphers = 'AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305'
2023-11-07 11:44:27 us=546000   authname = 'SHA3-256'
2023-11-07 11:44:27 us=546000   engine = DISABLED
2023-11-07 11:44:27 us=546000   replay = ENABLED
2023-11-07 11:44:27 us=546000   mute_replay_warnings = DISABLED
2023-11-07 11:44:27 us=546000   replay_window = 64
2023-11-07 11:44:27 us=546000   replay_time = 15
2023-11-07 11:44:27 us=546000   packet_id_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   test_crypto = DISABLED
2023-11-07 11:44:27 us=546000   tls_server = DISABLED
2023-11-07 11:44:27 us=546000   tls_client = ENABLED
2023-11-07 11:44:27 us=546000   ca_file = '[INLINE]'
2023-11-07 11:44:27 us=546000   ca_path = '[UNDEF]'
2023-11-07 11:44:27 us=546000   dh_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   cert_file = '[INLINE]'
2023-11-07 11:44:27 us=546000   extra_certs_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   priv_key_file = '[INLINE]'
2023-11-07 11:44:27 us=546000   pkcs12_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   cryptoapi_cert = '[UNDEF]'
2023-11-07 11:44:27 us=546000   cipher_list = '[UNDEF]'
2023-11-07 11:44:27 us=546000   cipher_list_tls13 = '[UNDEF]'
2023-11-07 11:44:27 us=546000   tls_cert_profile = '[UNDEF]'
2023-11-07 11:44:27 us=546000   tls_verify = '[UNDEF]'
2023-11-07 11:44:27 us=546000   tls_export_cert = '[UNDEF]'
2023-11-07 11:44:27 us=546000   verify_x509_type = 1
2023-11-07 11:44:27 us=546000   verify_x509_name = '<REDACTED>'
2023-11-07 11:44:27 us=546000   crl_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   ns_cert_type = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 65535
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_ku[i] = 0
2023-11-07 11:44:27 us=546000   remote_cert_eku = 'TLS Web Server Authentication'
2023-11-07 11:44:27 us=546000   ssl_flags = 192
2023-11-07 11:44:27 us=546000   tls_timeout = 2
2023-11-07 11:44:27 us=546000   renegotiate_bytes = -1
2023-11-07 11:44:27 us=546000   renegotiate_packets = 0
2023-11-07 11:44:27 us=546000   renegotiate_seconds = 0
2023-11-07 11:44:27 us=546000   handshake_window = 60
2023-11-07 11:44:27 us=546000   transition_window = 3600
2023-11-07 11:44:27 us=546000   single_session = DISABLED
2023-11-07 11:44:27 us=546000   push_peer_info = DISABLED
2023-11-07 11:44:27 us=546000   tls_exit = DISABLED
2023-11-07 11:44:27 us=546000   tls_crypt_v2_metadata = '[UNDEF]'
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_protected_authentication = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_private_mode = 00000000
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_cert_private = DISABLED
2023-11-07 11:44:27 us=546000   pkcs11_pin_cache_period = -1
2023-11-07 11:44:27 us=546000   pkcs11_id = '[UNDEF]'
2023-11-07 11:44:27 us=546000   pkcs11_id_management = DISABLED
2023-11-07 11:44:27 us=546000   server_network = 0.0.0.0
2023-11-07 11:44:27 us=546000   server_netmask = 0.0.0.0
2023-11-07 11:44:27 us=546000   server_network_ipv6 = ::
2023-11-07 11:44:27 us=546000   server_netbits_ipv6 = 0
2023-11-07 11:44:27 us=546000   server_bridge_ip = 0.0.0.0
2023-11-07 11:44:27 us=546000   server_bridge_netmask = 0.0.0.0
2023-11-07 11:44:27 us=546000   server_bridge_pool_start = 0.0.0.0
2023-11-07 11:44:27 us=546000   server_bridge_pool_end = 0.0.0.0
2023-11-07 11:44:27 us=546000   ifconfig_pool_defined = DISABLED
2023-11-07 11:44:27 us=546000   ifconfig_pool_start = 0.0.0.0
2023-11-07 11:44:27 us=546000   ifconfig_pool_end = 0.0.0.0
2023-11-07 11:44:27 us=546000   ifconfig_pool_netmask = 0.0.0.0
2023-11-07 11:44:27 us=546000   ifconfig_pool_persist_filename = '[UNDEF]'
2023-11-07 11:44:27 us=546000   ifconfig_pool_persist_refresh_freq = 600
2023-11-07 11:44:27 us=546000   ifconfig_ipv6_pool_defined = DISABLED
2023-11-07 11:44:27 us=546000   ifconfig_ipv6_pool_base = ::
2023-11-07 11:44:27 us=546000   ifconfig_ipv6_pool_netbits = 0
2023-11-07 11:44:27 us=546000   n_bcast_buf = 256
2023-11-07 11:44:27 us=546000   tcp_queue_limit = 64
2023-11-07 11:44:27 us=546000   real_hash_size = 256
2023-11-07 11:44:27 us=546000   virtual_hash_size = 256
2023-11-07 11:44:27 us=546000   client_connect_script = '[UNDEF]'
2023-11-07 11:44:27 us=546000   learn_address_script = '[UNDEF]'
2023-11-07 11:44:27 us=546000   client_disconnect_script = '[UNDEF]'
2023-11-07 11:44:27 us=546000   client_crresponse_script = '[UNDEF]'
2023-11-07 11:44:27 us=546000   client_config_dir = '[UNDEF]'
2023-11-07 11:44:27 us=546000   ccd_exclusive = DISABLED
2023-11-07 11:44:27 us=546000   tmp_dir = 'C:\Users\<REDACTED>\AppData\Local\Temp\'
2023-11-07 11:44:27 us=546000   push_ifconfig_defined = DISABLED
2023-11-07 11:44:27 us=546000   push_ifconfig_local = 0.0.0.0
2023-11-07 11:44:27 us=546000   push_ifconfig_remote_netmask = 0.0.0.0
2023-11-07 11:44:27 us=546000   push_ifconfig_ipv6_defined = DISABLED
2023-11-07 11:44:27 us=546000   push_ifconfig_ipv6_local = ::/0
2023-11-07 11:44:27 us=546000   push_ifconfig_ipv6_remote = ::
2023-11-07 11:44:27 us=546000   enable_c2c = DISABLED
2023-11-07 11:44:27 us=546000   duplicate_cn = DISABLED
2023-11-07 11:44:27 us=546000   cf_max = 0
2023-11-07 11:44:27 us=546000   cf_per = 0
2023-11-07 11:44:27 us=546000   cf_initial_max = 100
2023-11-07 11:44:27 us=546000   cf_initial_per = 10
2023-11-07 11:44:27 us=546000   max_clients = 1024
2023-11-07 11:44:27 us=546000   max_routes_per_client = 256
2023-11-07 11:44:27 us=546000   auth_user_pass_verify_script = '[UNDEF]'
2023-11-07 11:44:27 us=546000   auth_user_pass_verify_script_via_file = DISABLED
2023-11-07 11:44:27 us=546000   auth_token_generate = DISABLED
2023-11-07 11:44:27 us=546000   auth_token_lifetime = 0
2023-11-07 11:44:27 us=546000   auth_token_secret_file = '[UNDEF]'
2023-11-07 11:44:27 us=546000   vlan_tagging = DISABLED
2023-11-07 11:44:27 us=546000   vlan_accept = all
2023-11-07 11:44:27 us=546000   vlan_pvid = 1
2023-11-07 11:44:27 us=546000   client = ENABLED
2023-11-07 11:44:27 us=546000   pull = ENABLED
2023-11-07 11:44:27 us=546000   auth_user_pass_file = 'stdin'
2023-11-07 11:44:27 us=546000   show_net_up = DISABLED
2023-11-07 11:44:27 us=546000   route_method = 3
2023-11-07 11:44:27 us=546000   block_outside_dns = DISABLED
2023-11-07 11:44:27 us=546000   ip_win32_defined = DISABLED
2023-11-07 11:44:27 us=546000   ip_win32_type = 1
2023-11-07 11:44:27 us=546000   dhcp_masq_offset = 0
2023-11-07 11:44:27 us=546000   dhcp_lease_time = 31536000
2023-11-07 11:44:27 us=546000   tap_sleep = 0
2023-11-07 11:44:27 us=546000   dhcp_options = 0x00000000
2023-11-07 11:44:27 us=546000   dhcp_renew = DISABLED
2023-11-07 11:44:27 us=546000   dhcp_pre_release = DISABLED
2023-11-07 11:44:27 us=546000   domain = '[UNDEF]'
2023-11-07 11:44:27 us=546000   netbios_scope = '[UNDEF]'
2023-11-07 11:44:27 us=546000   netbios_node_type = 0
2023-11-07 11:44:27 us=546000   disable_nbt = DISABLED
2023-11-07 11:44:27 us=546000 OpenVPN 2.6.6 [git:v2.6.6/c9540130121bfc21] Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Aug 15 2023
2023-11-07 11:44:27 us=546000 Windows version 10.0 (Windows 10 or greater), amd64 executable
2023-11-07 11:44:27 us=546000 library versions: OpenSSL 3.1.2 1 Aug 2023, LZO 2.10
2023-11-07 11:44:27 us=546000 DCO version: v0
2023-11-07 11:44:27 us=546000 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25341
2023-11-07 11:44:27 us=546000 Need hold release from management interface, waiting...
2023-11-07 11:44:48 us=515000 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:4154
2023-11-07 11:44:48 us=625000 MANAGEMENT: CMD 'state on'
2023-11-07 11:44:48 us=625000 MANAGEMENT: CMD 'log on all'
2023-11-07 11:44:49 us=62000 MANAGEMENT: CMD 'echo on all'
2023-11-07 11:44:49 us=62000 MANAGEMENT: CMD 'bytecount 5'
2023-11-07 11:44:49 us=78000 MANAGEMENT: CMD 'state'
2023-11-07 11:44:49 us=78000 MANAGEMENT: CMD 'hold off'
2023-11-07 11:44:49 us=78000 MANAGEMENT: CMD 'hold release'
2023-11-07 11:45:09 us=296000 MANAGEMENT: CMD 'username "Auth" "<REDACTED>"'
2023-11-07 11:45:09 us=312000 MANAGEMENT: CMD 'password [...]'
2023-11-07 11:45:09 us=343000 Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA3-256' for HMAC authentication
2023-11-07 11:45:09 us=343000 Incoming Control Channel Authentication: Using 256 bit message hash 'SHA3-256' for HMAC authentication
2023-11-07 11:45:09 us=343000 Control Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1250 tun_max_mtu:0 headroom:126 payload:1600 tailroom:126 ET:0 ]
2023-11-07 11:45:09 us=343000 MANAGEMENT: >STATE:1699353909,RESOLVE,,,,,,
2023-11-07 11:45:11 us=562000 Data Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]
2023-11-07 11:45:11 us=562000 TCP/UDP: Preserving recently used remote address: [AF_INET]<REDACTED>:1194
2023-11-07 11:45:11 us=562000 Enumerate drivers in registy: 
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {E1649A4F-0288-485D-88D8-CE0302AEC0FD}, Driver: tap-windows6
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {0107D8BD-6ED5-46CD-A202-CB1FF89C0C86}, Driver: wintun
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {514BEB6D-CFCC-436E-9F3C-BB1C77E1F3C0}, Driver: ovpn-dco
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {7CDEE9BF-CCCD-43E5-A13F-3B6800A47A4E}, Driver: tap-windows6
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {ABBCC49E-1680-40DD-AB47-AD468352ED8A}, Driver: tap-windows6
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {A230D696-EA94-4D58-A2D0-3BCA64A9B8AE}, Driver: wintun
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {5E0C1BA0-98BC-4822-AD37-C9245D755F7B}, Driver: ovpn-dco
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {BB6ECF73-580E-4C8B-A5F7-960A75985905}, Driver: ovpn-dco
2023-11-07 11:45:11 us=562000 Enumerate device interface lists:
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {4DA85A75-43BC-489B-81CE-235B542F1DC9}, Device Interface: \\?\BTH#MS_BTHPAN#8&8cebe08&0&2#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {74B1D0E2-C1F7-45DE-A3F4-184ACC32CD9D}, Device Interface: \\?\SWD#MSRRAS#MS_PPPOEMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {E1649A4F-0288-485D-88D8-CE0302AEC0FD}, Device Interface: \\?\ROOT#NET#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {7CDEE9BF-CCCD-43E5-A13F-3B6800A47A4E}, Device Interface: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {ABBCC49E-1680-40DD-AB47-AD468352ED8A}, Device Interface: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {15C13AAE-D6AA-45D1-BBCF-3B108FE5EE1A}, Device Interface: \\?\ROOT#NET#0005#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {514BEB6D-CFCC-436E-9F3C-BB1C77E1F3C0}, Device Interface: \\?\ROOT#NET#0007#{cac88484-7515-4c03-82e6-71a87abac361}\{514BEB6D-CFCC-436E-9F3C-BB1C77E1F3C0}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {514BEB6D-CFCC-436E-9F3C-BB1C77E1F3C0}, Device Interface: \\?\ROOT#NET#0007#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {5CB9BBB1-A05F-4A0A-BE0B-4C7B8226E973}, Device Interface: \\?\ROOT#NET#0008#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {65A83F9B-1754-436F-9BA1-2E8D56A1BB75}, Device Interface: \\?\SWD#MSRRAS#MS_PPTPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {D1A95A40-B8DF-40DE-8CAB-13438C95FA82}, Device Interface: \\?\SWD#MSRRAS#MS_AGILEVPNMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {36F8FF8A-DC3A-4CB7-8084-072577953FE8}, Device Interface: \\?\{5d624f94-8850-40c3-a3fa-a4fd2080baf3}#vwifimp_wfd#5&f1a5953&0&11#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {7D00809A-2B43-4354-8FC1-228FC106B69D}, Device Interface: \\?\{5d624f94-8850-40c3-a3fa-a4fd2080baf3}#vwifimp_wfd#5&f1a5953&0&12#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {3D258CA5-56D0-4C7A-9D08-A5FCC54E8553}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANBH#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {4A74EA43-BDE4-4791-9B7B-A03D3E5F1B51}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANIP#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {6028F007-3862-4086-9FC1-7D11665F56F3}, Device Interface: \\?\SWD#MSRRAS#MS_SSTPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {67121E08-DF1C-47A8-94C4-D54DEE638ED8}, Device Interface: \\?\USB#VID_17E9&PID_6013&MI_05#8&11bd5cc2&0&0005#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {6E8A7732-989D-4D68-991B-15F5D0929CB4}, Device Interface: \\?\PCI#VEN_14C3&DEV_0616&SUBSYS_E0C617AA&REV_00#4&203c3454&0&0013#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {2B007719-9489-473C-A5DF-E0F0EAFA8E8B}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANIPV6#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {82055079-38F2-4BEE-A7F5-0FFC8C3393C9}, Device Interface: \\?\SWD#MSRRAS#MS_L2TPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 NetCfgInstanceId: {6B64981C-60C8-457B-BBD4-D8E07C65D243}, Device Interface: \\?\ROOT#VMS_VSMP#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2023-11-07 11:45:11 us=562000 Using device interface: \\?\ROOT#NET#0007#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2023-11-07 11:45:11 us=562000 CreateFile failed on ovpn-dco device: \\?\ROOT#NET#0007#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco: Zugriff verweigert   (errno=5)
2023-11-07 11:45:11 us=562000 MANAGEMENT: Client disconnected
2023-11-07 11:45:11 us=562000 All ovpn-dco adapters on this system are currently in use or disabled.
2023-11-07 11:45:11 us=562000 Exiting due to fatal error

@lstipakov
Copy link
Member

Thanks for the log. Let's do some cleanup:

  1. Uninstall your openvpn client.
  2. Remove devices. Run in Powershell elevated prompt:
    2.1 Enumerate devices:
PS C:\Windows\system32> pnputil /enum-devices | Select-String "Data Channel Offload" -Context 2,0

  Instance ID:                ROOT\NET\0003
> Device Description:         OpenVPN Data Channel Offload #2

  Instance ID:                ROOT\NET\0004
> Device Description:         OpenVPN Data Channel Offload #3

2.2 Remove devices:

PS C:\Windows\system32> pnputil /remove-device ROOT\NET\0003
Microsoft PnP Utility

Removing device:          ROOT\NET\0003
Device removed successfully.

PS C:\Windows\system32> pnputil /remove-device ROOT\NET\0004
Microsoft PnP Utility

Removing device:          ROOT\NET\0004
Device removed successfully.
  1. Remove drivers. Run in Powershell elevated prompt:
    3.1 Enumerate drivers:
PS C:\Windows\system32> pnputil /enum-drivers | Select-String "ovpn-dco.inf" -Context 2,5

  Published Name:     oem141.inf
> Original Name:      ovpn-dco.inf
  Provider Name:      OpenVPN, Inc
  Class Name:         Net
  Class GUID:         {4d36e972-e325-11ce-bfc1-08002be10318}
  Driver Version:     03/30/2023 0.9.3.0
  Signer Name:        Microsoft Windows Hardware Compatibility Publisher

  Published Name:     oem92.inf
> Original Name:      ovpn-dco.inf
  Provider Name:      OpenVPN, Inc
  Class Name:         Net
  Class GUID:         {4d36e972-e325-11ce-bfc1-08002be10318}
  Driver Version:     10/08/2023 1.0.0.0
  Signer Name:        Microsoft Windows Hardware Compatibility Publisher

3.2 Delete drivers:

PS C:\Windows\system32> pnputil /delete-driver oem141.inf
Microsoft PnP Utility

Driver package deleted successfully.

PS C:\Windows\system32> pnputil /delete-driver oem92.inf
Microsoft PnP Utility

Driver package deleted successfully.

After that please reinstall the client and try again.

@R-Studio
Copy link

@lstipakov I followed all of your steps and reinstalled the openvpn client. I can see now I have a newer DCO driver installed 10/08/2023 1.0.0.0 before it was 03/30/2023 0.9.3.0, but unfotunately I still can't use DCO.

@jb217
Copy link

jb217 commented Jan 9, 2024

For anyone who finds this in the future... I ran into the same problem. No number of uninstalls, reinstalls or adding dco or tun/tap adapters was fixing it. The common theme seems to be an access denied error. I was able to successfully circumvent the error by running the gui as an admin. The connection would go through fine. If I re-ran the gui without specifying to run it as an admin the error came back.

To FIX the problem: I ran a command window as an admin, changed to the directory where I downloaded openvpn and ran the install from the elevated command window (In my case OpenVPN-2.6.8-I001-amd64.msi). The gui now runs the connection successfully without needing admin access.

Hope this helps someone!

2024-01-09 13:46:34 us=203000 Using device interface: \\?\ROOT#NET#0002#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2024-01-09 13:46:34 us=203000 CreateFile failed on ovpn-dco device: \\?\ROOT#NET#0002#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco: Access is denied.   (errno=5)

2024-01-09 13:46:34 us=203000 All ovpn-dco adapters on this system are currently in use or disabled.
2024-01-09 13:46:34 us=203000 Exiting due to fatal error

@lstipakov
Copy link
Member

While it may work, running GUI as admin is not a recommended way to run OpenVPN.

Regarding the proposed fix - it is interesting that running install from elevated command prompt makes the difference - MSI does elevation by itself when needed. Would it be possible for you or someone else to run the installer both in admin and non-admin prompt and collect the logs?

msiexec.exe /i OpenVPN-2.6.8-I001-amd64.msi /L*V log.txt

lstipakov added a commit to lstipakov/ovpn-dco-win that referenced this issue Jan 22, 2024
Some users are getting Access Denied error when device is
accessed by the app running as unprivileged process. The problem
can be workarounded by running openvpn process as privileged.

While I cannot reproduce it, this change should likely
solve it by explicitly enable read and write access to
the device by everyone.

To set SDDL, we need to assign unique device name. Using
WdfDeviceInitSetCharacteristics() with FILE_AUTOGENERATED_DEVICE_NAME
didn't work for me.

Fixes OpenVPN#38

Signed-off-by: Lev Stipakov <lev@openvpn.net>
@lstipakov
Copy link
Member

lstipakov commented Jan 22, 2024

@jb217 @R-Studio
I've done yet another change to the driver, could you give it a try?
1.0.3-Win10.zip
1.0.3-Win11.zip

@lstipakov lstipakov self-assigned this Jan 22, 2024
@lstipakov lstipakov added the bug Something isn't working label Jan 22, 2024
@jb217
Copy link

jb217 commented Jan 22, 2024

Sorry, no. Same result.

  Published Name:     oem56.inf
> Original Name:      ←[7movpn-dco.inf←[0m
←[7m←[0m  Provider Name:      OpenVPN, Inc←[0m
←[7m←[0m  Class Name:         Net←[0m
←[7m←[0m  Class GUID:         {4d36e972-e325-11ce-bfc1-08002be10318}←[0m
←[7m←[0m  Driver Version:     01/17/2024 1.0.2.0←[0m
←[7m←[0m  Signer Name:        Microsoft Windows Hardware Compatibility Publisher←[0m

  Published Name:     oem43.inf
> Original Name:      ←[7movpn-dco.inf←[0m
←[7m←[0m  Provider Name:      OpenVPN, Inc←[0m
←[7m←[0m  Class Name:         Net←[0m
←[7m←[0m  Class GUID:         {4d36e972-e325-11ce-bfc1-08002be10318}←[0m
←[7m←[0m  Driver Version:     10/08/2023 1.0.0.0←[0m
←[7m←[0m  Signer Name:        Microsoft Windows Hardware Compatibility Publisher←[0m

  Published Name:     oem57.inf
> Original Name:      ←[7movpn-dco.inf←[0m
←[7m←[0m  Provider Name:      OpenVPN, Inc←[0m
←[7m←[0m  Class Name:         Net←[0m
←[7m←[0m  Class GUID:         {4d36e972-e325-11ce-bfc1-08002be10318}←[0m
←[7m←[0m  Driver Version:     01/22/2024 1.0.3.0←[0m
←[7m←[0m  Signer Name:        Microsoft Windows Hardware Compatibility Publisher←[0m
  Instance ID:                ROOT\NET\0002
> Device Description:         OpenVPN ←[7mData Channel Offload←[0m
←[7m←[0m  Class Name:                 Net←[0m
←[7m←[0m  Class GUID:                 {4d36e972-e325-11ce-bfc1-08002be10318}←[0m
←[7m←[0m  Manufacturer Name:          OpenVPN, Inc←[0m
←[7m←[0m  Status:                     Started←[0m
←[7m←[0m  Driver Name:                oem57.inf←[0m

  Instance ID:                ROOT\NET\0003
> Device Description:         OpenVPN ←[7mData Channel Offload←[0m #2←[0m
←[7m←[0m  Class Name:                 Net←[0m
←[7m←[0m  Class GUID:                 {4d36e972-e325-11ce-bfc1-08002be10318}←[0m
←[7m←[0m  Manufacturer Name:          OpenVPN, Inc←[0m
←[7m←[0m  Status:                     Started←[0m
←[7m←[0m  Driver Name:                oem57.inf←[0m

@lstipakov
Copy link
Member

Could you post the output of Get-NetAdapterBinding ?

@lstipakov
Copy link
Member

@jb217 by any chance you are not in Finland or any Nordic country aren't you?

I asked for help on OSR forum, let's see if we get some advices. Meanwhile I'll install that app you've mentioned and check if that helps to reproduce the issue.

@jb217
Copy link

jb217 commented Jan 23, 2024

No, I'm not from that part of the world...

Name                           DisplayName                                        ComponentID          Enabled
----                           -----------                                        -----------          -------
OpenVPN Wintun                 Microsoft Network Adapter Multiplexor Protocol     ms_implat            False
OpenVPN Wintun                 Link-Layer Topology Discovery Mapper I/O Driver    ms_lltdio            True
OpenVPN Wintun                 File and Printer Sharing for Microsoft Networks    ms_server            True
OpenVPN Wintun                 Internet Protocol Version 6 (TCP/IPv6)             ms_tcpip6            True
OpenVPN Wintun                 Internet Protocol Version 4 (TCP/IPv4)             ms_tcpip             True
OpenVPN Wintun                 Microsoft LLDP Protocol Driver                     ms_lldp              True
OpenVPN Wintun                 Client for Microsoft Networks                      ms_msclient          True
OpenVPN Wintun                 Link-Layer Topology Discovery Responder            ms_rspndr            True
Local Area Connection          Link-Layer Topology Discovery Mapper I/O Driver    ms_lltdio            True
Local Area Connection          Microsoft Network Adapter Multiplexor Protocol     ms_implat            False
Local Area Connection          Microsoft LLDP Protocol Driver                     ms_lldp              True
Local Area Connection          File and Printer Sharing for Microsoft Networks    ms_server            True
Local Area Connection          Internet Protocol Version 4 (TCP/IPv4)             ms_tcpip             True
Local Area Connection          Client for Microsoft Networks                      ms_msclient          True
Local Area Connection          Link-Layer Topology Discovery Responder            ms_rspndr            True
Local Area Connection          Internet Protocol Version 6 (TCP/IPv6)             ms_tcpip6            True
Ethernet                       Microsoft LLDP Protocol Driver                     ms_lldp              True
Ethernet                       Link-Layer Topology Discovery Responder            ms_rspndr            True
Ethernet                       Client for Microsoft Networks                      ms_msclient          True
Ethernet                       File and Printer Sharing for Microsoft Networks    ms_server            True
Ethernet                       Link-Layer Topology Discovery Mapper I/O Driver    ms_lltdio            True
Ethernet                       Microsoft Network Adapter Multiplexor Protocol     ms_implat            False
Ethernet                       Internet Protocol Version 6 (TCP/IPv6)             ms_tcpip6            True
Ethernet                       Internet Protocol Version 4 (TCP/IPv4)             ms_tcpip             True
Ethernet                       QoS Packet Scheduler                               ms_pacer             True
Local Area Connection 2        Microsoft Network Adapter Multiplexor Protocol     ms_implat            False
Local Area Connection 2        File and Printer Sharing for Microsoft Networks    ms_server            True
Local Area Connection 2        Internet Protocol Version 4 (TCP/IPv4)             ms_tcpip             True
Local Area Connection 2        Client for Microsoft Networks                      ms_msclient          True
Local Area Connection 2        Microsoft LLDP Protocol Driver                     ms_lldp              True
Local Area Connection 2        Link-Layer Topology Discovery Mapper I/O Driver    ms_lltdio            True
Local Area Connection 2        Internet Protocol Version 6 (TCP/IPv6)             ms_tcpip6            True
Local Area Connection 2        Link-Layer Topology Discovery Responder            ms_rspndr            True
Wi-Fi                          Client for Microsoft Networks                      ms_msclient          True
Wi-Fi                          File and Printer Sharing for Microsoft Networks    ms_server            True
Wi-Fi                          Microsoft LLDP Protocol Driver                     ms_lldp              True
Wi-Fi                          Microsoft Network Adapter Multiplexor Protocol     ms_implat            False
Wi-Fi                          Internet Protocol Version 4 (TCP/IPv4)             ms_tcpip             True
Wi-Fi                          QoS Packet Scheduler                               ms_pacer             True
Wi-Fi                          Link-Layer Topology Discovery Mapper I/O Driver    ms_lltdio            True
Wi-Fi                          Link-Layer Topology Discovery Responder            ms_rspndr            True
Wi-Fi                          Internet Protocol Version 6 (TCP/IPv6)             ms_tcpip6            True
OpenVPN TAP-Windows6           Internet Protocol Version 4 (TCP/IPv4)             ms_tcpip             True
OpenVPN TAP-Windows6           Microsoft Network Adapter Multiplexor Protocol     ms_implat            False
OpenVPN TAP-Windows6           Microsoft LLDP Protocol Driver                     ms_lldp              True
OpenVPN TAP-Windows6           Link-Layer Topology Discovery Responder            ms_rspndr            True
OpenVPN TAP-Windows6           Internet Protocol Version 6 (TCP/IPv6)             ms_tcpip6            True
OpenVPN TAP-Windows6           Link-Layer Topology Discovery Mapper I/O Driver    ms_lltdio            True
OpenVPN TAP-Windows6           QoS Packet Scheduler                               ms_pacer             True
OpenVPN TAP-Windows6           Client for Microsoft Networks                      ms_msclient          True
OpenVPN TAP-Windows6           File and Printer Sharing for Microsoft Networks    ms_server            True

@alexalok
Copy link

alexalok commented Jan 29, 2024

I am unfortunately facing the same issue (Windows 10 Version 10.0.19045.3930):

2024-01-29 14:28:32 us=640000 Enumerate drivers in registy: 
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {310B9C10-E90E-4B01-B27B-7E36EB245785}, Driver: tap-windows6
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {CF4C4D6B-2AB6-4DAA-B9AE-98E5344DAF8D}, Driver: tap-windows6
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {9FE56CCF-8017-47FF-AAD4-9DD5A4D0FBA2}, Driver: wintun
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {4B2F5D09-6DD7-4F06-9BE9-944A74EBDFA7}, Driver: ovpn-dco
2024-01-29 14:28:32 us=640000 Enumerate device interface lists:
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {5CB37E83-E444-4BD7-B471-D282FE20BC9C}, Device Interface: \\?\{5d624f94-8850-40c3-a3fa-a4fd2080baf3}#vwifimp_wfd#5&138632db&0&11#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {80FA2751-A703-4BEA-863B-194CA3C9E7E0}, Device Interface: \\?\{5d624f94-8850-40c3-a3fa-a4fd2080baf3}#vwifimp_wfd#5&138632db&0&12#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {A283C171-AC13-4F13-8EAF-0F34614122EE}, Device Interface: \\?\SWD#MSRRAS#MS_PPPOEMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {9FE56CCF-8017-47FF-AAD4-9DD5A4D0FBA2}, Device Interface: \\?\ROOT#NET#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {310B9C10-E90E-4B01-B27B-7E36EB245785}, Device Interface: \\?\ROOT#NET#0002#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {4B2F5D09-6DD7-4F06-9BE9-944A74EBDFA7}, Device Interface: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}\{4B2F5D09-6DD7-4F06-9BE9-944A74EBDFA7}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {4B2F5D09-6DD7-4F06-9BE9-944A74EBDFA7}, Device Interface: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {CF4C4D6B-2AB6-4DAA-B9AE-98E5344DAF8D}, Device Interface: \\?\ROOT#NET#0005#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {BCF9DBD3-072A-4196-80C7-37FA26E79F29}, Device Interface: \\?\ROOT#VMWARE#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {FC782168-9EA4-4DFB-BB79-57096AA77B45}, Device Interface: \\?\ROOT#VMWARE#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {EE664658-3C38-4538-BEAD-49FA9DE51255}, Device Interface: \\?\PCI#VEN_10EC&DEV_8168&SUBSYS_390017AA&REV_15#01000000684CE00000#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {9619CAD2-462B-4E44-93CC-0C3F302E8979}, Device Interface: \\?\SWD#MSRRAS#MS_PPTPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {93456D05-0A19-4A1E-8BED-F4E0BB2AE866}, Device Interface: \\?\SWD#MSRRAS#MS_AGILEVPNMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {34147A27-7DB7-4BB1-AD8B-849AC1481C21}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANBH#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {0339F291-29A4-42A2-B46A-32001C1E92E7}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANIP#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {478000DA-676B-438D-8FCA-B15A10430AE8}, Device Interface: \\?\SWD#MSRRAS#MS_SSTPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {C4901AD1-A328-43D3-89E3-8054FD1CD322}, Device Interface: \\?\BTH#MS_BTHPAN#7&8500d0f&0&2#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {685DCA60-041B-46D9-A561-826564CBF545}, Device Interface: \\?\PCI#VEN_8086&DEV_2723&SUBSYS_00808086&REV_1A#4&270b8a2c&0&0012#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {BCB23686-342E-4E29-BC0B-50D74821905F}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANIPV6#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {A099AC4E-309E-4A1F-A222-F21EAC39F77E}, Device Interface: \\?\SWD#MSRRAS#MS_L2TPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {8F91E5BA-F7D3-4736-A6D4-EACAA624E252}, Device Interface: \\?\ROOT#VMS_VSMP#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {7DE1AA5E-2956-496E-B206-1287A4C7D3D7}, Device Interface: \\?\ROOT#VMS_MP#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {EF4484EB-2E81-4063-849F-137025008A1F}, Device Interface: \\?\ROOT#VMS_MP#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {CE986A6C-C4D5-4CB6-B800-B688C15E7BCF}, Device Interface: \\?\ROOT#VMS_MP#0002#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {142055BE-C822-45B0-8107-DC647EBB7908}, Device Interface: \\?\ROOT#VMS_MP#0003#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {3663F965-4605-4619-97A2-383E82F13C50}, Device Interface: \\?\ROOT#VMS_MP#0004#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {9CB9DCE5-FB63-4E20-8F37-40C50A346ED6}, Device Interface: \\?\ROOT#VMS_VSMP#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 NetCfgInstanceId: {CEDA83F2-7F24-4616-8733-B7A6A39BE054}, Device Interface: \\?\ROOT#VMS_MP#0005#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 14:28:32 us=640000 Using device interface: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2024-01-29 14:28:32 us=656000 CreateFile failed on ovpn-dco device: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco: Access is denied.   (errno=5)
2024-01-29 14:28:32 us=656000 MANAGEMENT: Client disconnected
2024-01-29 14:28:32 us=656000 All ovpn-dco adapters on this system are currently in use or disabled.
2024-01-29 14:28:32 us=656000 Exiting due to fatal error

@lstipakov
Copy link
Member

@alexalok does this version of the driver makes any difference?

@alexalok
Copy link

@lstipakov unfortunately, that didn't help:

PS C:\Users\aleks> pnputil /enum-devices | Select-String "Data Channel Offload" -Context 2,5


  Instance ID:                ROOT\NET\0003
> Device Description:         OpenVPN Data Channel Offload
  Class Name:                 Net
  Class GUID:                 {4d36e972-e325-11ce-bfc1-08002be10318}
  Manufacturer Name:          OpenVPN, Inc
  Status:                     Started
  Driver Name:                oem151.inf

  Instance ID:                ROOT\NET\0004
> Device Description:         OpenVPN Data Channel Offload #2
  Class Name:                 Net
  Class GUID:                 {4d36e972-e325-11ce-bfc1-08002be10318}
  Manufacturer Name:          OpenVPN, Inc
  Status:                     Started
  Driver Name:                oem151.inf
2024-01-29 19:52:46 us=93000 Enumerate drivers in registy: 
2024-01-29 19:52:46 us=93000 NetCfgInstanceId: {8079A38E-060B-4808-B911-CE9C15C89B1F}, Driver: tap-windows6
2024-01-29 19:52:46 us=93000 NetCfgInstanceId: {A6690EF5-0F79-441F-9A6C-80CD485E1E69}, Driver: wintun
2024-01-29 19:52:46 us=93000 NetCfgInstanceId: {6D16288C-A606-416E-8499-AE08FCD2C6A4}, Driver: ovpn-dco
2024-01-29 19:52:46 us=93000 NetCfgInstanceId: {3C48F97A-1747-4865-AB40-8DFD8272CF07}, Driver: ovpn-dco
2024-01-29 19:52:46 us=109000 Enumerate device interface lists:
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {5CB37E83-E444-4BD7-B471-D282FE20BC9C}, Device Interface: \\?\{5d624f94-8850-40c3-a3fa-a4fd2080baf3}#vwifimp_wfd#5&138632db&0&11#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {80FA2751-A703-4BEA-863B-194CA3C9E7E0}, Device Interface: \\?\{5d624f94-8850-40c3-a3fa-a4fd2080baf3}#vwifimp_wfd#5&138632db&0&12#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {A283C171-AC13-4F13-8EAF-0F34614122EE}, Device Interface: \\?\SWD#MSRRAS#MS_PPPOEMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {BCF9DBD3-072A-4196-80C7-37FA26E79F29}, Device Interface: \\?\ROOT#VMWARE#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {FC782168-9EA4-4DFB-BB79-57096AA77B45}, Device Interface: \\?\ROOT#VMWARE#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {EE664658-3C38-4538-BEAD-49FA9DE51255}, Device Interface: \\?\PCI#VEN_10EC&DEV_8168&SUBSYS_390017AA&REV_15#01000000684CE00000#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {9619CAD2-462B-4E44-93CC-0C3F302E8979}, Device Interface: \\?\SWD#MSRRAS#MS_PPTPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {93456D05-0A19-4A1E-8BED-F4E0BB2AE866}, Device Interface: \\?\SWD#MSRRAS#MS_AGILEVPNMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {34147A27-7DB7-4BB1-AD8B-849AC1481C21}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANBH#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {0339F291-29A4-42A2-B46A-32001C1E92E7}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANIP#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {478000DA-676B-438D-8FCA-B15A10430AE8}, Device Interface: \\?\SWD#MSRRAS#MS_SSTPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {C4901AD1-A328-43D3-89E3-8054FD1CD322}, Device Interface: \\?\BTH#MS_BTHPAN#7&8500d0f&0&2#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {685DCA60-041B-46D9-A561-826564CBF545}, Device Interface: \\?\PCI#VEN_8086&DEV_2723&SUBSYS_00808086&REV_1A#4&270b8a2c&0&0012#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {BCB23686-342E-4E29-BC0B-50D74821905F}, Device Interface: \\?\SWD#MSRRAS#MS_NDISWANIPV6#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {A099AC4E-309E-4A1F-A222-F21EAC39F77E}, Device Interface: \\?\SWD#MSRRAS#MS_L2TPMINIPORT#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {888D24C5-A427-4714-9970-7C1BA22B26FD}, Device Interface: \\?\ROOT#VMS_VSMP#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {D9E285D4-EF25-4E37-83F9-21726F4246F1}, Device Interface: \\?\ROOT#VMS_MP#0000#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {8D4EFB93-6362-486C-8199-EAD41D14FC47}, Device Interface: \\?\ROOT#VMS_MP#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {926CA723-B762-407A-8BFF-FE280997986C}, Device Interface: \\?\ROOT#VMS_MP#0002#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {93D1E170-D5E8-4920-9658-C37822CECCEF}, Device Interface: \\?\ROOT#VMS_MP#0003#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {57889F2C-CC6F-4EC2-9E57-3AD54E390E67}, Device Interface: \\?\ROOT#VMS_MP#0004#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {85B2FB60-5B8A-478D-8D4B-6724E2B2A1A1}, Device Interface: \\?\ROOT#VMS_VSMP#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {81441221-8023-4807-8406-A9AB6635BFE9}, Device Interface: \\?\ROOT#VMS_MP#0005#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {8079A38E-060B-4808-B911-CE9C15C89B1F}, Device Interface: \\?\ROOT#NET#0001#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {A6690EF5-0F79-441F-9A6C-80CD485E1E69}, Device Interface: \\?\ROOT#NET#0002#{cac88484-7515-4c03-82e6-71a87abac361}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {6D16288C-A606-416E-8499-AE08FCD2C6A4}, Device Interface: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {6D16288C-A606-416E-8499-AE08FCD2C6A4}, Device Interface: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}\{6D16288C-A606-416E-8499-AE08FCD2C6A4}
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {3C48F97A-1747-4865-AB40-8DFD8272CF07}, Device Interface: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2024-01-29 19:52:46 us=109000 NetCfgInstanceId: {3C48F97A-1747-4865-AB40-8DFD8272CF07}, Device Interface: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}\{3C48F97A-1747-4865-AB40-8DFD8272CF07}
2024-01-29 19:52:46 us=109000 Using device interface: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2024-01-29 19:52:46 us=109000 CreateFile failed on ovpn-dco device: \\?\ROOT#NET#0003#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco: Access is denied.   (errno=5)
2024-01-29 19:52:46 us=109000 Using device interface: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco
2024-01-29 19:52:46 us=109000 CreateFile failed on ovpn-dco device: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}\ovpn-dco: Access is denied.   (errno=5)
2024-01-29 19:52:46 us=109000 MANAGEMENT: Client disconnected
2024-01-29 19:52:46 us=109000 All ovpn-dco adapters on this system are currently in use or disabled.
2024-01-29 19:52:46 us=109000 Exiting due to fatal error

I have also noticed that the issue only appears when I am trying to connect to the server using TCP. I can successfully connect to the same server using UDP with virtually same client config (except proto). Both server configs also differ only in proto.

@lstipakov
Copy link
Member

@alexalok are you sure your UDP config uses DCO? Could you paste the log?

@R-Studio
Copy link

R-Studio commented Feb 5, 2024

@lstipakov I tested the driver too and I have the same issue again.

@lstipakov
Copy link
Member

Those who experience this problem - is there any way I could get an access to the machine? If there any legal obstacles I am sure this could be sorted out with the company I am working for (OpenVPN, Inc).

@lstipakov
Copy link
Member

Somehow I managed to reproduce it on my VM. @alexalok @R-Studio @jb217 After installing 1.0.3 can you run openvpn.exe --version?

c:\Program Files\OpenVPN\bin>openvpn.exe --version
OpenVPN 2.6.9 [git:v2.6.9/6640a10bf6d84eee] Windows [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Feb 12 2024
library versions: OpenSSL 3.2.0 23 Nov 2023, LZO 2.10
Windows version 10.0 (Windows 10 or greater), amd64 executable
DCO version: 1.0.3
Originally developed by James Yonan
Copyright (C) 2002-2023 OpenVPN Inc <sales@openvpn.net>
Compile time defines: N/A

@R-Studio
Copy link

@lstipakov I cannot install the drivers "1.0.3-Win11":
image

But this is my output before installing 1.0.3-Win11:
image

@lstipakov
Copy link
Member

Stupid question, but are you using Windows 11? For Windows 10 you might want to use 1.0.3-Win10.zip.

(just retested on my machine, works as expected)

Please provide the relevant part of C:\Windows\INF\setupapi.dev.log.

@jb217
Copy link

jb217 commented Feb 29, 2024

Somehow I managed to reproduce it on my VM. @alexalok @R-Studio @jb217 After installing 1.0.3 can you run openvpn.exe --version?

PS C:\Program Files\OpenVPN\bin> C:\"Program Files"\OpenVPN\bin\openvpn.exe --version
OpenVPN 2.6.8 [git:v2.6.8/3b0d9489cc423da3] Windows [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Nov 17 2023
library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
Windows version 10.0 (Windows 10 or greater), amd64 executable
DCO version: N/A
Originally developed by James Yonan
Copyright (C) 2002-2023 OpenVPN Inc <sales@openvpn.net>
Compile time defines: N/A

@R-Studio
Copy link

R-Studio commented Mar 1, 2024

Stupid question, but are you using Windows 11? For Windows 10 you might want to use 1.0.3-Win10.zip.

(just retested on my machine, works as expected)

Please provide the relevant part of C:\Windows\INF\setupapi.dev.log.

Yes I am using Windows 11 and I also started the terminal as Administrator 😉
Here is my log:

>>>  [Device Install (UpdateDriverForPlugAndPlayDevices) - .\ovpn-dco.sys]
>>>  Section start 2024/02/29 07:58:29.253
      cmd: "C:\Users\<REDACTED>\Downloads\1.0.3-Win11\devcon.exe" install .\ovpn-dco.inf .\ovpn-dco.sys
     ndv: INF path: C:\Users\<REDACTED>\Downloads\1.0.3-Win11\ovpn-dco.inf
     ndv: Install flags: 0x00000001
     ndv: {Update Device Driver - ROOT\NET\0006}
     ndv:      Search options: 0x00000080
     ndv:      Searching single INF 'C:\Users\<REDACTED>\Downloads\1.0.3-Win11\ovpn-dco.inf'
     dvi:      {Build Driver List} 07:58:29.306
     dvi:           Searching for hardware ID(s):
     dvi:                .\ovpn-dco.sys
     dvi:      {Build Driver List - exit(0x00000000)} 07:58:29.329
!    ndv:      No matching drivers found in single INF
     dvi:      {DIF_SELECTBESTCOMPATDRV} 07:58:29.340
     dvi:           Default installer: Enter 07:58:29.350
     dvi:                {Select Best Driver}
!    dvi:                     Selecting driver failed(0xe0000228)
     dvi:                {Select Best Driver - exit(0xe0000228)}
!    dvi:           Default installer: failed
!    dvi:           Error 0xe0000228: There are no compatible drivers for this device.
     dvi:      {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 07:58:29.393
!    ndv:      Unable to select best compatible driver. Error = 0xe0000228
     ndv:      No drivers found for device.
     ndv: {Update Device Driver - exit(00000103)}
!    ndv: No better matching drivers found for device 'ROOT\NET\0006'.
     ndv: {Update Device Driver - ROOT\NET\0007}
     ndv:      Search options: 0x00000080
     ndv:      Searching single INF 'C:\Users\<REDACTED>\Downloads\1.0.3-Win11\ovpn-dco.inf'
     dvi:      {Build Driver List} 07:58:29.441
     dvi:           Searching for hardware ID(s):
     dvi:                .\ovpn-dco.sys
     dvi:      {Build Driver List - exit(0x00000000)} 07:58:29.463
!    ndv:      No matching drivers found in single INF
     dvi:      {DIF_SELECTBESTCOMPATDRV} 07:58:29.476
     dvi:           Default installer: Enter 07:58:29.483
     dvi:                {Select Best Driver}
!    dvi:                     Selecting driver failed(0xe0000228)
     dvi:                {Select Best Driver - exit(0xe0000228)}
!    dvi:           Default installer: failed
!    dvi:           Error 0xe0000228: There are no compatible drivers for this device.
     dvi:      {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 07:58:29.531
!    ndv:      Unable to select best compatible driver. Error = 0xe0000228
     ndv:      No drivers found for device.
     ndv: {Update Device Driver - exit(00000103)}
!    ndv: No better matching drivers found for device 'ROOT\NET\0007'.
!    ndv: No devices were updated.
<<<  Section end 2024/02/29 07:58:29.578
<<<  [Exit status: FAILURE(0x00000103)]

@tylarwi
Copy link

tylarwi commented Mar 7, 2024

dco connect error the semaphore timeout period has expired. (errno=121). can anyone help im using windows 10

@traveler3022
Copy link

I'm in the settings in the proxy section only
I changed the Confing proxy to the system proxy and the problem was solved
2

@Graveen
Copy link

Graveen commented Sep 23, 2024

Also used Portmaster (briefly, @jb217 ), and also got this error with latest msi (2.6.12), after install/reinstall/remove drivers not working, running the msi from an elevated command prompt fixed the issue. Windows 11 home 23H2.

@JeGr
Copy link

JeGr commented Oct 22, 2024

@lstipakov Adding myself to the mix of users that have the problem. I'm working with customers of ours setting up their firewalls with OpenVPN RAS server etc. so was looking for solutions here and stumbling over this as I could reproduce this on my own homeoffice machine with our work-VPN. Thought it was an update problem first (coming from 2.4, 2.5 etc. to 2.6) as the "run GUI as admin" I could remember from the past in the first versions of the GUI.

So if you need someone to test further build, @-me. The HO machine where I see the same problem is a Win11Pro build, OVPN 2.6.12 (latest) installed, same problem. The remote site running on OpenVPN 2.6.x with DCO enabled and I'm always having multiple configs around testing setups and sites from customers. Will add this issue to my tracker.

@lstipakov
Copy link
Member

@JeGr Could you please conduct a small test?

  1. Remove your existing OpenVPN client and ensure that driver is also removed, see here.

  2. Install this driver.

  3. Run this program in normal and elevated command prompt and post results here.

@JeGr
Copy link

JeGr commented Oct 22, 2024

@lstipakov
Sorry, had a bigger firewall/VPN setup this afternoon and didn't have time to check my pings here. Will gladly do it first thing tomorrow morning and report back. So complete removal of any OVPN components and traces incl. the driver?

@lstipakov
Copy link
Member

Yes, please remove all traces of the old drivers first.

@JeGr
Copy link

JeGr commented Oct 23, 2024

So was going through the steps:

  1. uninstalled OpenVPN
  2. removed devices (there was one left Data Channel Offload 2)
  3. removed drivers (there were 4 left - all were deleted)
  4. checked the devices and drivers command in PS again - all empty.
  5. installed the driver from the 1.0.3 archive

Output from commands:

PS C:\Users\jegr\Desktop\1.0.3-Win11> .\devcon.exe install .\ovpn-dco.inf ovpn-dco
Device node created. Install is complete when drivers are installed...
Updating drivers for ovpn-dco from C:\Users\jegr\Desktop\1.0.3-Win11\ovpn-dco.inf.
Drivers installed successfully.

PS C:\Users\jegr\Desktop\1.0.3-Win11> pnputil.exe /enum-devices | Select-String "Data Channel Offload" -Context 2,0


  Instanz-ID:                ROOT\NET\0000
> Gerätebeschreibung:         OpenVPN Data Channel Offload

PS C:\Users\jegr\Desktop\1.0.3-Win11> pnputil.exe /enum-drivers | Select-String "ovpn-dco.inf" -Context 2,5

  Veröffentlichter Name:     oem2.inf
> Originalname:      ovpn-dco.inf
  Anbietername:      OpenVPN, Inc
  Klassenname:         Net
  Klassen-GUID:         {4d36e972-e325-11ce-bfc1-08002be10318}
  Treiberversion:     01/22/2024 1.0.3.0
  Name des Signaturgebers:        Microsoft Windows Hardware Compatibility Publisher
  1. ran the drivertest:
Running as admin: NO
CreateFile(GENERIC_READ | GENERIC_WRITE): FFFFFFFFFFFFFFFF, GetLastError(): 5
CreateFile(GENERIC_READ): FFFFFFFFFFFFFFFF, GetLastError(): 5
Running as admin: YES
CreateFile(GENERIC_READ | GENERIC_WRITE): 0000000000000104, GetLastError(): 0
CreateFile(GENERIC_READ): 0000000000000104, GetLastError(): 0

To document: I still have not reinstalled OVPN any further. Just the drivers and the drivertest.exe are there.
@lstipakov anything else I can help with? Should I wait to reinstall OpenVPN to test further? Otherwise I'd reinstall for a testing setup tomorrow?

@lstipakov
Copy link
Member

@JeGr Thanks for your testing. Sadly I don't have any further suggestions. Something happens with access control which I do not quite understand. The fact that this is rare doesn't really help you and others who are affected. I am in the middle of something else right now, but I hope we will be able to fix it before 2.7.

@JeGr
Copy link

JeGr commented Oct 24, 2024

@lstipakov Totally understand. As it is also popping up infrequently in customer setups, the only mitigation right now was for the Clients to run their GUI as admin. Not that nice but as it's done manually, it's doable and at least otherwise works fine.

But if I can assist in narrowing it down, just ping me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests