Merge .p12 .tls and .ovpn into 1 file on iOS
-
- OpenVpn Newbie
- Posts: 9
- Joined: Sun May 31, 2020 1:35 pm
Merge .p12 .tls and .ovpn into 1 file on iOS
Hello,
I need help to setup my vpn on my iOS device.
I have three files (.p12 .tls .ovpn)
On w10 I enter with an user and psw.
How can I merge all these three files into one to install it on my device?
Please help me step by step is very important. Thank you.
I need help to setup my vpn on my iOS device.
I have three files (.p12 .tls .ovpn)
On w10 I enter with an user and psw.
How can I merge all these three files into one to install it on my device?
Please help me step by step is very important. Thank you.
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
-
- OpenVpn Newbie
- Posts: 9
- Joined: Sun May 31, 2020 1:35 pm
Re: Merge .p12 .tls and .ovpn into 1 file on iOS
Thx but not helped me because I don't know where to set my .p12 is it a cert or a ca?what's the difference? I don't have both and where I insert usr and psw?
-
- OpenVpn Newbie
- Posts: 9
- Joined: Sun May 31, 2020 1:35 pm
Re: Merge .p12 .tls and .ovpn into 1 file on iOS
OVPN
Client config
1
dev tun
2
persist-tun
3
persist-key
4
cipher AES-128-CBC
5
ncp-ciphers AES-128-GCM
6
auth SHA256
7
tls-client
8
client
9
resolv-retry infinite
10
remote XX.XXX.XXXX.XXX udp
11
verify-x509-name "YYYYY" name
12
auth-user-pass
13
pkcs12 pfSense-XXXXX-UDP4-1196-XXXXX.p12
14
tls-auth pfSense-XXXXX-UDP4-1196-XXXXX-tls.key 1
15
remote-cert-tls server
16
compress
17
TLS
18
-----BEGIN OpenVPN Static key V1-----
19
9f6c8f7409558aa9f851a166cf7abb93
20
b6d1e9424afcd7f818ef98aea1ecf78d
21
........
22
-----END OpenVPN Static key V1-----
23
p12
24
*a lot of numbers*
25
[oconf]
Last edited by Pippin on Tue Jun 02, 2020 5:54 pm, edited 1 time in total.
Reason: Formatting
Reason: Formatting
-
- OpenVPN Power User
- Posts: 51
- Joined: Thu Dec 13, 2018 11:15 pm
Re: Merge .p12 .tls and .ovpn into 1 file on iOS
The format of the file is fully described in the URL above.
You need to create a similar file with the specific data from your implementation.
The top part of the file is the contents of your .ovpn...
to convert your .p12/.pfx file into usable text, you'll need to use openssl.exe:
You need to create a similar file with the specific data from your implementation.
The top part of the file is the contents of your .ovpn...
Code: Select all
client
dev tun
proto udp
remote vpn.server.hostname 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
verb 3
key-direction 1
Code: Select all
<ca>
-----BEGIN CERTIFICATE-----
this part of the data is the Base64 encoded server authentication certificate's ROOT certificate
-----END CERTIFICATE-----
</ca>
Code: Select all
<cert>
-----BEGIN CERTIFICATE-----
this part of the data is the Base64 encoded client authentication certificate
-----END CERTIFICATE-----
</cert>
Code: Select all
<key>
-----BEGIN RSA PRIVATE KEY-----
this part of the data is the Base64 encoded client authentication certificate's KEY
-----END RSA PRIVATE KEY-----
</key>
Code: Select all
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
this part of the data is the Base64 encoded data from the .tls file
-----END OpenVPN Static key V1-----
</tls-auth>
Code: Select all
openssl.exe pkcs12 -in certificate.pfx -out cert-data.txt -nodes
-
- OpenVpn Newbie
- Posts: 9
- Joined: Sun May 31, 2020 1:35 pm
Re: Merge .p12 .tls and .ovpn into 1 file on iOS
Client config
1
dev tun
2
persist-tun
3
persist-key
4
cipher AES-128-CBC
5
ncp-ciphers AES-128-GCM
6
auth SHA256
7
tls-client
8
client
9
resolv-retry infinite
10
remote 62.77.63.228 1196 udp
11
auth-user-pass
12
remote-cert-tls server
13
compress
14
key-direction 1
15
Bag Attributes
16
localKeyID: 17 2D 54 8E ...
17
subject=...
18
issuer=...
19
<ca>
20
--STRIPPED INLINE CA CERT--
21
</ca>
22
Bag Attributes: <No Attributes>
23
subject=...
24
issuer=...
25
<cert>
26
--STRIPPED INLINE CERT--
27
</cert>
28
Bag Attributes
29
localKeyID: 17 2D 54 8E ...
30
Key Attributes: <No Attributes>
31
<key>
32
--STRIPPED INLINE KEY--
33
</key>
34
<tls-auth>
35
--STRIPPED INLINE TLS-AUTH KEY--
36
</tls-auth>
37
[oconf]
38
I setted It in this way and I get Error message: mbed TLS TLS: SSL read error: X509 - Certificate verification failed, e.g. CRL, CA or signature check failed.
Last edited by Pippin on Tue Jun 02, 2020 6:09 pm, edited 1 time in total.
Reason: Formatting
Reason: Formatting
-
- OpenVPN Power User
- Posts: 51
- Joined: Thu Dec 13, 2018 11:15 pm
Re: Merge .p12 .tls and .ovpn into 1 file on iOS
Remove the Bag Attributes sections from the CA, cert, and key. You only what the BEGIN to END lines.
Also make sure when you export the PKCS12 to PEM format what you don't enter a key encrypt password. Only enter the decrypt password.
Also make sure when you export the PKCS12 to PEM format what you don't enter a key encrypt password. Only enter the decrypt password.
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Merge .p12 .tls and .ovpn into 1 file on iOS
@ mdibella - Thanks for writing this up.
@ Moderation, perhaps this thread could be a sticky ?
@ Moderation, perhaps this thread could be a sticky ?