OpenVPN IOS app does not comply to profile settings on "keysize"
Posted: Wed Nov 01, 2017 9:32 am
My openvpn AS server is enforcing server settings and demands 448 keysize for BF-CBC. I have importted a profile from openvpn AS to my iphone. The connection disconnects and server logs says iphone tried 128 keysize which does not comply with the 448 keysize on the server.
Phone log shows the keysize is read from the profile, but never used on the tunnel
log from the phone:
2017-10-27 12:00:30 ----- OpenVPN Start ----- OpenVPN core 3.1.2 ios arm64 64-bit built on Dec 5 2016 12:50:25
2017-10-27 12:00:30 Frame=512/2048/512 mssfix-ctrl=1250
2017-10-27 12:00:30 UNUSED OPTIONS
3 [nobind]
15 [tls-version-min] [1.0] [or-highest]
17 [sndbuf] [100000]
18 [rcvbuf] [100000]
21 [verb] [3]
26 [key-direction] [1]
28 [auth-retry] [interact]
29 [tls-exit]
31 [keysize] [448]
38 [CLI_PREF_ALLOW_WEB_IMPORT] [True]
39 [CLI_PREF_BASIC_CLIENT] [False]
40 [CLI_PREF_ENABLE_CONNECT] [True]
41 [CLI_PREF_ENABLE_XD_PROXY] [True]
42 [WSHOST] [xxx.com:8443]
43 [WEB_CA_BUNDLE] [-----BEGIN CERTIFICATE----- MIIF/zCCA+egAwIBAgIBQTANBgkqhkiG9w0B...]
44 [IS_OPENVPN_WEB_CA] [0]
46 [ORGANIZATION] [xxx ltd]
2017-10-27 12:00:30 EVENT: RESOLVE
2017-10-27 12:00:30 Contacting xxx:1194 via UDP
2017-10-27 12:00:30 EVENT: WAIT
2017-10-27 12:00:30 SetTunnelSocket returned 1
2017-10-27 12:00:30 Connecting to [xxx.com]:1194 (xxx) via UDPv4
2017-10-27 12:00:30 EVENT: CONNECTING
2017-10-27 12:00:30 Tunnel Options:V4,dev-type tun,link-mtu 1554,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 1,cipher BF-CBC,auth SHA256,keysize 128,tls-auth,key-method 2,tls-client
2017-10-27 12:00:30 Creds: Username/Password
2017-10-27 12:00:30 Peer Info:
IV_GUI_VER=net.openvpn.connect.ios 1.1.1-212
IV_VER=3.1.2
IV_PLAT=ios
IV_NCP=2
IV_TCPNL=1
IV_PROTO=2
IV_LZO=1
IV_LZO_SWAP=1
IV_LZ4=1
IV_LZ4v2=1
IV_COMP_STUB=1
IV_COMP_STUBv2=1
IV_BS64DL=1
2017-10-27 12:00:30 VERIFY OK: depth=1
cert. version : 3
serial number : 56:14:E1:FC
issuer name : CN=OpenVPN CA
subject name : CN=OpenVPN CA
issued on : 2015-09-30 09:12:28
expires on : 2025-10-04 09:12:28
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=true
2017-10-27 12:00:30 VERIFY OK: depth=0
cert. version : 3
serial number : 01
issuer name : CN=OpenVPN CA
subject name : CN=OpenVPN Server
issued on : 2015-09-30 09:12:28
expires on : 2025-10-04 09:12:28
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=false
cert. type : SSL Server
2017-10-27 12:00:30 SSL Handshake: TLSv1.2/TLS-DHE-RSA-WITH-AES-256-GCM-SHA384
2017-10-27 12:00:30 Session is ACTIVE
2017-10-27 12:00:30 EVENT: GET_CONFIG
2017-10-27 12:00:30 Sending PUSH_REQUEST to server...
2017-10-27 12:00:30 AUTH_FAILED
2017-10-27 12:00:30 EVENT: AUTH_FAILED [ERR]
2017-10-27 12:00:30 EVENT: DISCONNECTED
log line from server:
WARNING: 'keysize' is used inconsistently, local='keysize 448', remote='keysize 128'"
Option inconsistency warnings triggering disconnect due to --opt-verify'
Phone log shows the keysize is read from the profile, but never used on the tunnel
log from the phone:
2017-10-27 12:00:30 ----- OpenVPN Start ----- OpenVPN core 3.1.2 ios arm64 64-bit built on Dec 5 2016 12:50:25
2017-10-27 12:00:30 Frame=512/2048/512 mssfix-ctrl=1250
2017-10-27 12:00:30 UNUSED OPTIONS
3 [nobind]
15 [tls-version-min] [1.0] [or-highest]
17 [sndbuf] [100000]
18 [rcvbuf] [100000]
21 [verb] [3]
26 [key-direction] [1]
28 [auth-retry] [interact]
29 [tls-exit]
31 [keysize] [448]
38 [CLI_PREF_ALLOW_WEB_IMPORT] [True]
39 [CLI_PREF_BASIC_CLIENT] [False]
40 [CLI_PREF_ENABLE_CONNECT] [True]
41 [CLI_PREF_ENABLE_XD_PROXY] [True]
42 [WSHOST] [xxx.com:8443]
43 [WEB_CA_BUNDLE] [-----BEGIN CERTIFICATE----- MIIF/zCCA+egAwIBAgIBQTANBgkqhkiG9w0B...]
44 [IS_OPENVPN_WEB_CA] [0]
46 [ORGANIZATION] [xxx ltd]
2017-10-27 12:00:30 EVENT: RESOLVE
2017-10-27 12:00:30 Contacting xxx:1194 via UDP
2017-10-27 12:00:30 EVENT: WAIT
2017-10-27 12:00:30 SetTunnelSocket returned 1
2017-10-27 12:00:30 Connecting to [xxx.com]:1194 (xxx) via UDPv4
2017-10-27 12:00:30 EVENT: CONNECTING
2017-10-27 12:00:30 Tunnel Options:V4,dev-type tun,link-mtu 1554,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 1,cipher BF-CBC,auth SHA256,keysize 128,tls-auth,key-method 2,tls-client
2017-10-27 12:00:30 Creds: Username/Password
2017-10-27 12:00:30 Peer Info:
IV_GUI_VER=net.openvpn.connect.ios 1.1.1-212
IV_VER=3.1.2
IV_PLAT=ios
IV_NCP=2
IV_TCPNL=1
IV_PROTO=2
IV_LZO=1
IV_LZO_SWAP=1
IV_LZ4=1
IV_LZ4v2=1
IV_COMP_STUB=1
IV_COMP_STUBv2=1
IV_BS64DL=1
2017-10-27 12:00:30 VERIFY OK: depth=1
cert. version : 3
serial number : 56:14:E1:FC
issuer name : CN=OpenVPN CA
subject name : CN=OpenVPN CA
issued on : 2015-09-30 09:12:28
expires on : 2025-10-04 09:12:28
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=true
2017-10-27 12:00:30 VERIFY OK: depth=0
cert. version : 3
serial number : 01
issuer name : CN=OpenVPN CA
subject name : CN=OpenVPN Server
issued on : 2015-09-30 09:12:28
expires on : 2025-10-04 09:12:28
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=false
cert. type : SSL Server
2017-10-27 12:00:30 SSL Handshake: TLSv1.2/TLS-DHE-RSA-WITH-AES-256-GCM-SHA384
2017-10-27 12:00:30 Session is ACTIVE
2017-10-27 12:00:30 EVENT: GET_CONFIG
2017-10-27 12:00:30 Sending PUSH_REQUEST to server...
2017-10-27 12:00:30 AUTH_FAILED
2017-10-27 12:00:30 EVENT: AUTH_FAILED [ERR]
2017-10-27 12:00:30 EVENT: DISCONNECTED
log line from server:
WARNING: 'keysize' is used inconsistently, local='keysize 448', remote='keysize 128'"
Option inconsistency warnings triggering disconnect due to --opt-verify'