OpenVPN / openvpn3

OpenVPN 3 is a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.
https://openvpn.net
Other
981 stars 388 forks source link

TUN Error: cannot acquire TAP handle #122

Closed charlessoft closed 3 years ago

charlessoft commented 3 years ago

I test ovpen cli under windows

ovpncli.exe -z 123456 "client.ovpn"

here is error log:

Fri Oct 2 10:38:06 2020 Session is ACTIVE Fri Oct 2 10:38:06 2020 EVENT: GET_CONFIG Fri Oct 2 10:38:06 2020 Sending PUSH_REQUEST to server... Fri Oct 2 10:38:06 2020 OPTIONS: 0 [redirect-gateway] [def1] [bypass-dhcp] 1 [dhcp-option] [DNS] [8.8.8.8] 2 [route] [10.8.0.1] 3 [topology] [net30] 4 [ping] [10] 5 [ping-restart] [120] 6 [ifconfig] [10.8.0.6] [10.8.0.5]

Fri Oct 2 10:38:06 2020 PROTOCOL OPTIONS: cipher: BF-CBC digest: SHA1 key-derivation: OpenVPN PRF compress: LZO_STUB peer ID: -1 Fri Oct 2 10:38:06 2020 EVENT: ASSIGN_IP Fri Oct 2 10:38:06 2020 CAPTURED OPTIONS: Session Name: 106.53.86.12 Layer: OSI_LAYER_3 Remote Address: 106.53.86.12 Tunnel Addresses: 10.8.0.6/30 -> 10.8.0.5 [net30] Reroute Gateway: IPv4=1 IPv6=0 flags=[ ENABLE REROUTE_GW DEF1 BYPASS_DHCP IPv4 ] Block IPv6: no Add Routes: 10.8.0.1/32 Exclude Routes: DNS Servers: 8.8.8.8 Search Domains:

Fri Oct 2 10:38:06 2020 TAP ADAPTERS:

Open TAP device "" PATH="" FAILED Fri Oct 2 10:38:06 2020 TUN Error: cannot acquire TAP handle Fri Oct 2 10:38:06 2020 EVENT: TUN_IFACE_CREATE cannot acquire TAP handle [FATAL-ERR] Fri Oct 2 10:38:06 2020 EVENT: DISCONNECTED Fri Oct 2 10:38:06 2020 Client exception in transport_recv: tun_exception: not connected Thread finished STATS: BYTES_IN : 3332 BYTES_OUT : 3315 PACKETS_IN : 9 PACKETS_OUT : 9 TUN_IFACE_CREATE : 1

lstipakov commented 3 years ago

This looks like you don't have tap or wintun driver installed. It comes, for example, with windows client https://openvpn.net/community-downloads/

charlessoft commented 3 years ago

install "OpenVPN-2.5-rc2-I601-amd64.msi" it works well, thanks. I see the package include "Wintun" components. Is wintun compiled by https://github.com/OpenVPN/tap-windows6?

lstipakov commented 3 years ago

Wintun from installation package is an MSM module which is obtained from https://www.wintun.net/ during installation package build. This is done by https://github.com/OpenVPN/openvpn-build/tree/master/windows-msi

charlessoft commented 3 years ago

thanks