Dear community,
I am having difficulties with my OpenVPN server setup (I am using the community version 2.5.5) and I am hoping that someone can help me to fix my issue. The server runs on a Windows 10 machine (Win 10 Pro version 10.0.19043.0) which is my home computer to which I would like to connect remotely. The computer is behind my Asus N66U network router (running MerlinWrt 380.70) where I have set rules for port forwarding and routing for the VPN.
This works fine if I use the OpenVPN IOS app from my phone using a TCP protocol. Using the same client configuration on my laptop (Win 10 Home version 10.0.19043.0; OpenVPN 2.5.5 community version), the client connects successfully, but I am unable to reach/ping the OpenVPN server machine or its subnet after the initial connection.
Same result if I switch to the UDP protocol. Strangely, the IOS app shows the same behavior (successful connection but server/subnet not reachable) when using UDP.
I don't get my head around the fact that IOS app + TCP protocol works fine and every other configuration fails. Any help would be very much appreciated. Log files for the different scenarios are shown below. I have already reinstalled the TAP adapter on the Windows client and had deactivated all firefalls for testing which didn't result in a different behaviour.
local 192.168.3.134
port 1194
proto tcp
dev tun
dh "C:\\Program Files\\OpenVPN\\server-keys\\dh4096.pem"
ca "C:\\Program Files\\OpenVPN\\server-keys\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\server-keys\\Server01.crt"
key "C:\\Program Files\\OpenVPN\\server-keys\\Server01.key"
server 10.19.15.0 255.255.255.0
push "route 192.168.3.0 255.255.255.0"
push "dhcp-option DNS 192.168.3.2"
cipher AES-256-GCM
keepalive 10 120
persist-key
persist-tun
duplicate-cn
topology subnet
status "C:\\Program Files\\OpenVPN\\log\\openvpn-status.log"
log "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
log-append "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
verb 3
client
dev tun
proto tcp
remote ############ 1194
cipher AES-256-GCM
remote-cert-tls server
redirect-gateway def1
keepalive 10 120
resolv-retry infinite
nobind
auth-nocache
<ca>
-----BEGIN CERTIFICATE-----
########
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
########
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
#########
-----END PRIVATE KEY-----
</key>
* Windows Client Log*
Thu Feb 3 19:58:01 2022 OpenVPN 2.5.5 Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Dec 15 2021
Thu Feb 3 19:58:01 2022 Windows version 10.0 (Windows 10 or greater) 64bit
Thu Feb 3 19:58:01 2022 library versions: OpenSSL 1.1.1l 24 Aug 2021, LZO 2.10
Thu Feb 3 19:58:01 2022 TCP/UDP: Preserving recently used remote address: [AF_INET]############:1194
Thu Feb 3 19:58:01 2022 Attempting to establish TCP connection with [AF_INET]############:1194 [nonblock]
Thu Feb 3 19:58:01 2022 TCP connection established with [AF_INET]############:1194
Thu Feb 3 19:58:01 2022 TCP_CLIENT link local: (not bound)
Thu Feb 3 19:58:01 2022 TCP_CLIENT link remote: [AF_INET]############:1194
Thu Feb 3 19:58:02 2022 [server01] Peer Connection Initiated with [AF_INET]############:1194
Thu Feb 3 19:58:02 2022 open_tun
Thu Feb 3 19:58:02 2022 tap-windows6 device [Local Area Connection] opened
Thu Feb 3 19:58:02 2022 Set TAP-Windows TUN subnet mode network/local/netmask = 10.19.15.0/10.19.15.2/255.255.255.0 [SUCCEEDED]
Thu Feb 3 19:58:02 2022 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.19.15.2/255.255.255.0 on interface {789977A1-AE5F-4A17-A049-14585CCDDFE8} [DHCP-serv: 10.19.15.0, lease-time: 31536000]
Thu Feb 3 19:58:02 2022 Successful ARP Flush on interface [15] {789977A1-AE5F-4A17-A049-14585CCDDFE8}
Thu Feb 3 19:58:02 2022 IPv4 MTU set to 1500 on interface 15 using service
Thu Feb 3 19:58:07 2022 Initialization Sequence Completed
* Server Log (connected with Windows client)*
2022-02-03 19:58:02 TCP connection established with [AF_INET]############:27602
2022-02-03 19:58:02 ############:27602 TLS: Initial packet from [AF_INET]############:27602, sid=53072f5d 27a591c9
2022-02-03 19:58:03 ############:27602 VERIFY OK: depth=1, C=##, ST=##, L=##, O=##, OU=##, CN=##, name=##, emailAddress=##
2022-02-03 19:58:03 ############:27602 VERIFY OK: depth=0, C=##, ST=##, L=##, O=##, OU=##, CN=##, name=##, emailAddress=##
2022-02-03 19:58:03 ############:27602 peer info: IV_VER=2.5.5
2022-02-03 19:58:03 ############:27602 peer info: IV_PLAT=win
2022-02-03 19:58:03 ############:27602 peer info: IV_PROTO=6
2022-02-03 19:58:03 ############:27602 peer info: IV_NCP=2
2022-02-03 19:58:03 ############:27602 peer info: IV_CIPHERS=AES-256-GCM:AES-128-GCM
2022-02-03 19:58:03 ############:27602 peer info: IV_LZ4=1
2022-02-03 19:58:03 ############:27602 peer info: IV_LZ4v2=1
2022-02-03 19:58:03 ############:27602 peer info: IV_LZO=1
2022-02-03 19:58:03 ############:27602 peer info: IV_COMP_STUB=1
2022-02-03 19:58:03 ############:27602 peer info: IV_COMP_STUBv2=1
2022-02-03 19:58:03 ############:27602 peer info: IV_TCPNL=1
2022-02-03 19:58:03 ############:27602 peer info: IV_GUI_VER=OpenVPN_GUI_11
2022-02-03 19:58:03 ############:27602 peer info: IV_SSO=openurl,crtext
2022-02-03 19:58:03 ############:27602 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2022-02-03 19:58:03 ############:27602 [client01] Peer Connection Initiated with [AF_INET]############:27602
2022-02-03 19:58:03 client01/############:27602 MULTI_sva: pool returned IPv4=10.19.15.2, IPv6=(Not enabled)
2022-02-03 19:58:03 client01/############:27602 MULTI: Learn: 10.19.15.2 -> client01/############:27602
2022-02-03 19:58:03 client01/############:27602 MULTI: primary virtual IP for client01/############:27602: 10.19.15.2
2022-02-03 19:58:03 client01/############:27602 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2022-02-03 19:58:03 client01/############:27602 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2022-02-03 19:58:03 client01/############:27602 SENT CONTROL [client01]: 'PUSH_REPLY,route 192.168.3.0 255.255.255.0,dhcp-option DNS 192.168.3.2,route-gateway 10.19.15.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.19.15.2 255.255.255.0,peer-id 0,cipher AES-256-GCM' (status=1)
2022-02-03 19:58:10 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:11 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:13 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:14 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:16 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:17 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:19 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:20 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:22 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:58:23 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:25 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:26 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=90
2022-02-03 19:58:28 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:29 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:31 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:32 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=90
2022-02-03 19:58:34 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=90
2022-02-03 19:58:35 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:37 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:58:38 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:40 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:58:41 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:43 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:58:44 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:46 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:58:47 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=69
2022-02-03 19:58:49 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:58:50 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:58:52 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:58:53 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:54 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:55 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=62
2022-02-03 19:58:56 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:58 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:58:59 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:01 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:02 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:59:04 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:05 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:07 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:08 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:13 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:59:14 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:16 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:59:17 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=106
2022-02-03 19:59:19 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:59:20 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:59:22 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:59:23 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:25 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=60
2022-02-03 19:59:26 client01/############:27602 MULTI: Outgoing TUN queue full, dropped packet len=44
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 write TCPv4_SERVER: Unknown error (code=10054)
2022-02-03 19:59:27 client01/############:27602 Connection reset, restarting [-1]
2022-02-03 19:59:27 client01/############:27602 SIGUSR1[soft,connection-reset] received, client-instance restarting
* IOS Client Log*
2022-02-03 20:16:03 ----- OpenVPN Start -----
OpenVPN core 3.git::58b92569 ios arm64 64-bit
2022-02-03 20:16:03 OpenVPN core 3.git::58b92569 ios arm64 64-bit
2022-02-03 20:16:03 Frame=512/2048/512 mssfix-ctrl=1250
2022-02-03 20:16:03 UNUSED OPTIONS
7 [auth-nocache]
2022-02-03 20:16:03 EVENT: RESOLVE
2022-02-03 20:16:03 Contacting [############]:1194/TCP via TCPv4
2022-02-03 20:16:03 EVENT: WAIT
2022-02-03 20:16:03 Connecting to [############]:1194 (############) via TCPv4
2022-02-03 20:16:03 EVENT: CONNECTING
2022-02-03 20:16:03 Tunnel Options:V4,dev-type tun,link-mtu 1523,tun-mtu 1500,proto TCPv4_CLIENT,cipher AES-256-GCM,auth [null-digest],keysize 256,key-method 2,tls-client
2022-02-03 20:16:03 Creds: UsernameEmpty/PasswordEmpty
2022-02-03 20:16:03 Peer Info:
IV_VER=3.git::58b92569
IV_PLAT=ios
IV_NCP=2
IV_TCPNL=1
IV_PROTO=2
IV_AUTO_SESS=1
IV_GUI_VER=net.openvpn.connect.ios_3.2.3-3760
IV_SSO=openurl
2022-02-03 20:16:03 VERIFY OK: depth=1, /C=##/ST=##/L=##/O=##/OU=##/CN=##/name=##/emailAddress=##
2022-02-03 20:16:03 VERIFY OK: depth=0, /C=##/ST=##/L=##/O=##/OU=##/CN=##/name=##/emailAddress=##
2022-02-03 20:16:03 SSL Handshake: CN=server01, TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 4096 bit RSA
2022-02-03 20:16:03 Session is ACTIVE
2022-02-03 20:16:03 EVENT: GET_CONFIG
2022-02-03 20:16:03 Sending PUSH_REQUEST to server...
2022-02-03 20:16:03 OPTIONS:
0 [route] [192.168.3.0] [255.255.255.0]
1 [dhcp-option] [DNS] [192.168.3.2]
2 [route-gateway] [10.19.15.1]
3 [topology] [subnet]
4 [ping] [10]
5 [ping-restart] [120]
6 [ifconfig] [10.19.15.2] [255.255.255.0]
7 [peer-id] [0]
8 [cipher] [AES-256-GCM]
2022-02-03 20:16:03 PROTOCOL OPTIONS:
cipher: AES-256-GCM
digest: NONE
compress: NONE
peer ID: 0
2022-02-03 20:16:03 EVENT: ASSIGN_IP
2022-02-03 20:16:03 NIP: preparing TUN network settings
2022-02-03 20:16:03 NIP: init TUN network settings with endpoint: ############
2022-02-03 20:16:03 NIP: adding IPv4 address to network settings 10.19.15.2/255.255.255.0
2022-02-03 20:16:03 NIP: adding (included) IPv4 route 10.19.15.0/24
2022-02-03 20:16:03 NIP: adding (included) IPv4 route 192.168.3.0/24
2022-02-03 20:16:03 NIP: adding DNS 192.168.3.2
2022-02-03 20:16:03 NIP: adding match domain ALL
2022-02-03 20:16:03 NIP: adding DNS specific routes:
2022-02-03 20:16:03 NIP: adding (included) IPv4 route 192.168.3.2/32
2022-02-03 20:16:03 Connected via NetworkExtensionTUN
2022-02-03 20:16:03 EVENT: CONNECTED ############:1194 (############) via /TCPv4 on NetworkExtensionTUN/10.19.15.2/ gw=[/]
* Server Log (connected with IOS client)*
2022-02-03 20:16:04 TCP connection established with [AF_INET]############:53854
2022-02-03 20:16:04 ############:53854 TLS: Initial packet from [AF_INET]############:53854, sid=7943fbe9 9cfdbb36
2022-02-03 20:16:04 ############:53854 VERIFY OK: depth=1, C=##, ST=##, L=##, O=##, OU=##, CN=##, name=##, emailAddress=##
2022-02-03 20:16:04 ############:53854 VERIFY OK: depth=0, C=##, ST=##, L=##, O=##, OU=##, CN=##, name=##, emailAddress=##
2022-02-03 20:16:04 ############:53854 peer info: IV_VER=3.git::58b92569
2022-02-03 20:16:04 ############:53854 peer info: IV_PLAT=ios
2022-02-03 20:16:04 ############:53854 peer info: IV_NCP=2
2022-02-03 20:16:04 ############:53854 peer info: IV_TCPNL=1
2022-02-03 20:16:04 ############:53854 peer info: IV_PROTO=2
2022-02-03 20:16:04 ############:53854 peer info: IV_AUTO_SESS=1
2022-02-03 20:16:04 ############:53854 peer info: IV_GUI_VER=net.openvpn.connect.ios_3.2.3-3760
2022-02-03 20:16:04 ############:53854 peer info: IV_SSO=openurl
2022-02-03 20:16:04 ############:53854 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1551', remote='link-mtu 1523'
2022-02-03 20:16:04 ############:53854 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2022-02-03 20:16:04 ############:53854 [client01] Peer Connection Initiated with [AF_INET]############:53854
2022-02-03 20:16:04 client01/############:53854 MULTI_sva: pool returned IPv4=10.19.15.2, IPv6=(Not enabled)
2022-02-03 20:16:04 client01/############:53854 MULTI: Learn: 10.19.15.2 -> client01/############:53854
2022-02-03 20:16:04 client01/############:53854 MULTI: primary virtual IP for client01/############:53854: 10.19.15.2
2022-02-03 20:16:04 client01/############:53854 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2022-02-03 20:16:04 client01/############:53854 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2022-02-03 20:16:04 client01/############:53854 PUSH: Received control message: 'PUSH_REQUEST'
2022-02-03 20:16:04 client01/############:53854 SENT CONTROL [client01]: 'PUSH_REPLY,route 192.168.3.0 255.255.255.0,dhcp-option DNS 192.168.3.2,route-gateway 10.19.15.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.19.15.2 255.255.255.0,peer-id 0,cipher AES-256-GCM' (status=1)
2022-02-03 20:17:02 client01/############:53854 Connection reset, restarting [0]
2022-02-03 20:17:02 client01/############:53854 SIGUSR1[soft,connection-reset] received, client-instance restarting