Hi experts,
I am using openvpn community 2.5 GA on client side (windows) and want to work with wintun as a virtual interface.
openvpn being run from command line with system elevation.
In part of the cases openvpn closing the connection at the second the connection is established with ping-restart
If connection is not closed at the second it is open, or in case of tap driver/interface is used there are no such disconnects.
It happens a lot on my laptop, but still haven't seen it even once on my stationary machine connected to the same ISP (although wired).
ping-restart defined as 10 seconds, ping as 3, so the first ping-restart disconnect is expected to be 10 seconds after connecting.
In any case tried to redefine to 60 and 10, it didn't resolve the issue too.
Log below is with verb 6
Client Debug
2020-12-23 14:39:52 us=143977 [x.x.x.x] Peer Connection Initiated with [AF_INET]x.x.x.x:1194
2020-12-23 14:39:53 us=191192 SENT CONTROL [x.x.x.x]: 'PUSH_REQUEST' (status=1)
2020-12-23 14:39:53 us=191192 UDP WRITE [128] to [AF_INET]x.x.x.x:1194: P_CONTROL_V1 kid=0 pid=[ #11 ] [ ] pid=6 DATA len=42
2020-12-23 14:39:53 us=198174 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:9999
2020-12-23 14:39:55 us=70203 UDP READ [94] from [AF_INET]x.x.x.x:1194: P_ACK_V1 kid=0 pid=[ #9 ] [ 6 ]
2020-12-23 14:39:55 us=72190 UDP READ [358] from [AF_INET]x.x.x.x:1194: P_CONTROL_V1 kid=0 pid=[ #10 ] [ ] pid=6 DATA len=272
2020-12-23 14:39:55 us=72190 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,sndbuf 2097152,rcvbuf 2097152,route 100.124.4.1,topology net30,ping 3,ping-restart 10,ifconfig 100.124.4.42 100.124.4.41,peer-id 1,cipher AES-256-GCM'
2020-12-23 14:39:55 us=72190 OPTIONS IMPORT: timers and/or timeouts modified
2020-12-23 14:39:55 us=72190 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
2020-12-23 14:39:55 us=72190 Socket Buffers: R=[65536->2097152] S=[64512->2097152]
2020-12-23 14:39:55 us=72190 OPTIONS IMPORT: --ifconfig/up options modified
2020-12-23 14:39:55 us=72190 OPTIONS IMPORT: route options modified
2020-12-23 14:39:55 us=72190 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2020-12-23 14:39:55 us=72190 OPTIONS IMPORT: peer-id set
2020-12-23 14:39:55 us=72190 OPTIONS IMPORT: adjusting link_mtu to 1625
2020-12-23 14:39:55 us=72190 OPTIONS IMPORT: data channel crypto options modified
2020-12-23 14:39:55 us=72190 Data Channel: using negotiated cipher 'AES-256-GCM'
2020-12-23 14:39:55 us=72190 Data Channel MTU parms [ L:1553 D:1350 EF:53 EB:406 ET:0 EL:3 ]
2020-12-23 14:39:55 us=72190 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2020-12-23 14:39:55 us=72190 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2020-12-23 14:39:55 us=72190 interactive service msg_channel=0
2020-12-23 14:39:55 us=105104 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 I=19 HWADDR=e4:a4:71:01:dd:67
2020-12-23 14:39:55 us=155967 open_tun
2020-12-23 14:39:55 us=171925 wintun device [Local Area Connection] opened
2020-12-23 14:39:55 us=172921 do_ifconfig, ipv4=1, ipv6=0
2020-12-23 14:39:56 us=175258 NETSH: C:\WINDOWS\system32\netsh.exe interface ip set address 16 static 100.124.4.42 255.255.255.252
2020-12-23 14:39:58 us=491100 NETSH: C:\WINDOWS\system32\netsh.exe interface ip delete dns 16 all
2020-12-23 14:40:00 us=720172 NETSH: C:\WINDOWS\system32\netsh.exe interface ip set dns 16 static 8.8.8.8 validate=no
2020-12-23 14:40:03 us=268392 NETSH: C:\WINDOWS\system32\netsh.exe interface ip add dns 16 8.8.4.4 validate=no
2020-12-23 14:40:05 us=501451 NETSH: C:\WINDOWS\system32\netsh.exe interface ip delete wins 16 all
2020-12-23 14:40:06 us=376123 IPv4 MTU set to 1500 on interface 16 using SetIpInterfaceEntry()
2020-12-23 14:40:06 us=376123 C:\WINDOWS\system32\route.exe ADD x.x.x.x MASK 255.255.255.255 192.168.1.1
2020-12-23 14:40:06 us=393079 ROUTE: route addition failed using CreateIpForwardEntry: The object already exists. [status=5010 if_index=19]
2020-12-23 14:40:06 us=393079 Route addition via IPAPI failed [adaptive]
2020-12-23 14:40:06 us=393079 Route addition fallback to route.exe
2020-12-23 14:40:06 us=394075 env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
2020-12-23 14:40:07 us=359508 C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 100.124.4.41
2020-12-23 14:40:07 us=377460 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=5 and dwForwardType=4
2020-12-23 14:40:07 us=377460 Route addition via IPAPI succeeded [adaptive]
2020-12-23 14:40:07 us=377460 C:\WINDOWS\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 100.124.4.41
2020-12-23 14:40:07 us=409374 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=5 and dwForwardType=4
2020-12-23 14:40:07 us=409374 Route addition via IPAPI succeeded [adaptive]
2020-12-23 14:40:07 us=409374 C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 0.0.0.0 100.124.4.41
2020-12-23 14:40:07 us=438298 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=5 and dwForwardType=4
2020-12-23 14:40:07 us=438298 Route addition via IPAPI succeeded [adaptive]
2020-12-23 14:40:07 us=438298 C:\WINDOWS\system32\route.exe ADD 100.124.4.1 MASK 255.255.255.255 100.124.4.41
2020-12-23 14:40:07 us=445280 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=5 and dwForwardType=4
2020-12-23 14:40:07 us=445280 Route addition via IPAPI succeeded [adaptive]
2020-12-23 14:40:07 us=445280 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2020-12-23 14:40:07 us=445280 Initialization Sequence Completed
2020-12-23 14:40:07 us=446276 UDP WRITE [94] to [AF_INET]x.x.x.x:1194: P_ACK_V1 kid=0 pid=[ #12 ] [ 6 ]
2020-12-23 14:40:07 us=446276 [x.x.x.x] Inactivity timeout (--ping-restart), restarting
2020-12-23 14:40:07 us=446276 TCP/UDP: Closing socket
2020-12-23 14:40:07 us=446276 C:\WINDOWS\system32\route.exe DELETE 0.0.0.0 MASK 0.0.0.0 100.124.4.41
2020-12-23 14:40:07 us=453258 Route deletion via IPAPI succeeded [adaptive]
2020-12-23 14:40:07 us=453258 C:\WINDOWS\system32\route.exe DELETE 100.124.4.1 MASK 255.255.255.255 100.124.4.41
2020-12-23 14:40:07 us=523073 Route deletion via IPAPI succeeded [adaptive]
2020-12-23 14:40:07 us=523073 C:\WINDOWS\system32\route.exe DELETE x.x.x.x MASK 255.255.255.255 192.168.1.1
2020-12-23 14:40:07 us=531051 Route deletion via IPAPI succeeded [adaptive]
2020-12-23 14:40:07 us=531051 C:\WINDOWS\system32\route.exe DELETE 0.0.0.0 MASK 128.0.0.0 100.124.4.41
client
dev tun
key "private_key.pem"
tls-version-min 1.2
tls-cipher TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256:TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256:TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256
auth SHA512
cipher AES-256-CBC
resolv-retry infinite
auth-retry none
nobind
persist-key
ns-cert-type server
comp-lzo
verb 4
windows-driver wintun
tls-client
up-delay
management 127.0.0.1 9999
connect-retry-max 3
mssfix 1350
route 0.0.0.0 0.0.0.0
Any ideas what can be wrong?