Hi, I have a problem playing games using the service I’ve built with openvpn. When I connect to openVPN server, the game basic communication is normal, when I join PVP, it get hangs at loading screen, but it works without connecting to the VPN server. The basic communication of the game server is the TCP protocol, and PVP part is the UDP protocol. I think the problem may related to this.
Whether openvpn's proto is tcp or udp, will get the same result.
The openVPN configuration(eg:udp) is as follows.
server configuration:
port 1194
proto udp
dev tun0
ca /etc/openvpn/ca.crt
cert /etc/openvpn/ServerRSA.crt
key /etc/openvpn/ServerRSA.key
dh /etc/openvpn/dh2048.pem
server 9.20.100.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir /etc/openvpn/ccd
route 9.20.78.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.20.18.10"
client-to-client
duplicate-cn
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log /etc/openvpn/openvpn.log
verb 4
client configuration:
client
dev tun0
proto udp
remote 10.20.78.41 1194
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
verb 3
redirect-gateway
<ca>
--STRIPPED INLINE CA CERT--
</ca>
<cert>
--STRIPPED INLINE CERT--
</cert>
<key>
--STRIPPED INLINE KEY--
</key>
openvpn.log when client connect:
Wed Nov 29 21:03:21 2017 us=97673 MULTI: multi_create_instance called
Wed Nov 29 21:03:21 2017 us=97856 10.20.106.18:37465 Re-using SSL/TLS context
Wed Nov 29 21:03:21 2017 us=97908 10.20.106.18:37465 LZO compression initialized
Wed Nov 29 21:03:21 2017 us=98033 10.20.106.18:37465 Control Channel MTU parms [ L:1542 D:1212 EF:38 EB:0 ET:0 EL:3 ]
Wed Nov 29 21:03:21 2017 us=98058 10.20.106.18:37465 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:143 ET:0 EL:3 AF:3/1 ]
Wed Nov 29 21:03:21 2017 us=98097 10.20.106.18:37465 Local Options String: 'V4,dev-type tun,link-mtu 1542,tun-mtu 1500,proto UDPv4,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-server'
Wed Nov 29 21:03:21 2017 us=98117 10.20.106.18:37465 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1542,tun-mtu 1500,proto UDPv4,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-client'
Wed Nov 29 21:03:21 2017 us=98145 10.20.106.18:37465 Local Options hash (VER=V4): '530fdded'
Wed Nov 29 21:03:21 2017 us=98163 10.20.106.18:37465 Expected Remote Options hash (VER=V4): '41690919'
Wed Nov 29 21:03:21 2017 us=98202 10.20.106.18:37465 TLS: Initial packet from [AF_INET]10.20.106.18:37465, sid=a44f3a74 17e246b0
Wed Nov 29 21:03:21 2017 us=144942 10.20.106.18:37465 VERIFY OK: depth=1, C=US, ST=NY, L=New York City, O=KS, OU=KS, CN=KS CA, name=KsRSA, emailAddress=
ksclient@gmail.net
Wed Nov 29 21:03:21 2017 us=145181 10.20.106.18:37465 VERIFY OK: depth=0, C=US, ST=NY, L=New York City, O=KS, OU=KS, CN=ClientRSA, name=KsRSA, emailAddress=
ksclient@gmail.net
Wed Nov 29 21:03:21 2017 us=157314 10.20.106.18:37465 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Nov 29 21:03:21 2017 us=157356 10.20.106.18:37465 WARNING: this cipher's block size is less than 128 bit (64 bit). Consider using a --cipher with a larger block size.
Wed Nov 29 21:03:21 2017 us=157373 10.20.106.18:37465 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Nov 29 21:03:21 2017 us=157429 10.20.106.18:37465 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Nov 29 21:03:21 2017 us=157443 10.20.106.18:37465 WARNING: this cipher's block size is less than 128 bit (64 bit). Consider using a --cipher with a larger block size.
Wed Nov 29 21:03:21 2017 us=157456 10.20.106.18:37465 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Nov 29 21:03:21 2017 us=159647 10.20.106.18:37465 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Wed Nov 29 21:03:21 2017 us=159691 10.20.106.18:37465 [ClientRSA] Peer Connection Initiated with [AF_INET]10.20.106.18:37465
Wed Nov 29 21:03:21 2017 us=159752 ClientRSA/10.20.106.18:37465 OPTIONS IMPORT: reading client specific options from: /etc/openvpn/ccd/ClientRSA
Wed Nov 29 21:03:21 2017 us=159811 ClientRSA/10.20.106.18:37465 MULTI_sva: pool returned IPv4=9.20.100.6, IPv6=(Not enabled)
Wed Nov 29 21:03:21 2017 us=159868 ClientRSA/10.20.106.18:37465 MULTI: Learn: 9.20.100.6 -> ClientRSA/10.20.106.18:37465
Wed Nov 29 21:03:21 2017 us=159882 ClientRSA/10.20.106.18:37465 MULTI: primary virtual IP for ClientRSA/10.20.106.18:37465: 9.20.100.6
Wed Nov 29 21:03:21 2017 us=159894 ClientRSA/10.20.106.18:37465 MULTI: internal route 10.20.106.0/24 -> ClientRSA/10.20.106.18:37465
Wed Nov 29 21:03:21 2017 us=159907 ClientRSA/10.20.106.18:37465 MULTI: Learn: 10.20.106.0/24 -> ClientRSA/10.20.106.18:37465
Wed Nov 29 21:03:21 2017 us=159918 ClientRSA/10.20.106.18:37465 MULTI: internal route 9.20.78.0/24 -> ClientRSA/10.20.106.18:37465
Wed Nov 29 21:03:21 2017 us=159930 ClientRSA/10.20.106.18:37465 MULTI: Learn: 9.20.78.0/24 -> ClientRSA/10.20.106.18:37465
Wed Nov 29 21:03:22 2017 us=373074 ClientRSA/10.20.106.18:37465 PUSH: Received control message: 'PUSH_REQUEST'
Wed Nov 29 21:03:22 2017 us=373146 ClientRSA/10.20.106.18:37465 send_push_reply(): safe_cap=940
Wed Nov 29 21:03:22 2017 us=373179 ClientRSA/10.20.106.18:37465 SENT CONTROL [ClientRSA]: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 10.20.18.10,route 9.20.100.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 9.20.100.6 9.20.100.5' (status=1)
Wed Nov 29 21:03:22 2017 us=698024 ClientRSA/10.20.106.18:37465 MULTI: Learn: 10.20.106.18 -> ClientRSA/10.20.106.18:37465