Wont connect using openVPN

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
dearyuxiao
OpenVpn Newbie
Posts: 4
Joined: Sun Aug 20, 2017 2:50 pm

Wont connect using openVPN

Post by dearyuxiao » Sun Aug 20, 2017 3:02 pm

EVENT: CORE_ERROR PolarSSL: error parsing config private key : PK - Bad input parameters to function [ERR]

I get this error when I connect my own VPN server using iOS openVPN (OpenVPN 1.1.1 build 212 iOS 64-bit).

The VPN server I built is on Raspberry Pi using PiVPN, which I can connect using computer version OpenVPN without problems. I copied the same config file I used on the computer to iPhone. I got the error shown above. The server using a 4096-bit key, is this the problem?

Anyone know how can I fix it? Thanks in advance.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Wont connect using openVPN

Post by TinCanTech » Sun Aug 20, 2017 4:08 pm


dearyuxiao
OpenVpn Newbie
Posts: 4
Joined: Sun Aug 20, 2017 2:50 pm

Re: Wont connect using openVPN

Post by dearyuxiao » Sun Aug 20, 2017 4:43 pm

Thanks for the reply, but I don't think this is my case, I can sync with iTunes, and my key ca etc. are in one file.

dearyuxiao
OpenVpn Newbie
Posts: 4
Joined: Sun Aug 20, 2017 2:50 pm

Re: Wont connect using openVPN

Post by dearyuxiao » Sun Aug 20, 2017 4:52 pm

I thought I used 4096 bit key but after checking the config file, it looks like I am actually using a 2048 key.

Code: Select all

client
dev tun
proto udp
remote server.name 1194
resolv-retry infinite
nobind
persist-key
persist-tun
key-direction 1
remote-cert-tls server
tls-version-min 1.2
verify-x509-name server name
cipher AES-256-CBC
auth SHA256
comp-lzo
verb 1
<ca>
-----BEGIN CERTIFICATE-----
..............................................
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
..............................................
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN ENCRYPTED PRIVATE KEY-----
-----END ENCRYPTED PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
..............................................
-----END OpenVPN Static key V1-----
</tls-auth>

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Wont connect using openVPN

Post by TinCanTech » Sun Aug 20, 2017 4:58 pm

dearyuxiao wrote:I thought I used 4096 bit key but after checking the config file, it looks like I am actually using a 2048 key.


<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
..............................................
-----END OpenVPN Static key V1-----
</tls-auth>
That is only the --tls-auth key not your private key.

dearyuxiao
OpenVpn Newbie
Posts: 4
Joined: Sun Aug 20, 2017 2:50 pm

Re: Wont connect using openVPN

Post by dearyuxiao » Sun Aug 20, 2017 7:27 pm

TinCanTech wrote:
dearyuxiao wrote:I thought I used 4096 bit key but after checking the config file, it looks like I am actually using a 2048 key.


<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
..............................................
-----END OpenVPN Static key V1-----
</tls-auth>
That is only the --tls-auth key not your private key.
Ok, thanks for explaining. but still, I won't be able to connect to the VPN server. I can use the same config file to connect using a windows 10 computer. I don't know what the problem is.

Post Reply