2

I have tried to create an VPN server of my own. I have ca.crt, server.crt, and client.key. How can I combine these into a single .opvn file?

Will it work if i change the extension of server.crt to server.ovpn?

1
  • 7
    server.ovpn isn't the certificate...it's the configuration file...
    – Nathan C
    Jun 24, 2014 at 17:12

1 Answer 1

13

Assuming you don't actually mean to "convert", but to "combine", "embed" or simply "use".

You can use the [inline] directive inside your .ovpn config file.
There's a good example here: Embedding key/cert/ca into client config

ca       [inline]
cert     [inline]
key      [inline]
tls-auth [inline] 1

<ca>
-----BEGIN CERTIFICATE-----
# insert base64 blob from ca.crt
-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----
# insert base64 blob from client1.crt
-----END CERTIFICATE-----
</cert>

<key>
-----BEGIN PRIVATE KEY-----
# insert base64 blob from client1.key
-----END PRIVATE KEY-----
</key>

<tls-auth>
-----BEGIN OpenVPN Static key V1-----
# insert ta.key
-----END OpenVPN Static key V1-----
</tls-auth>
11
  • thanks for your link it helped me ..i have pasted my client crt and client key and do i wanna save that i .ovpn file format ?? Jun 24, 2014 at 18:03
  • do i wanna save that file in .ovpn format ?? Jun 24, 2014 at 18:04
  • You can give the resulting file any extension you want, it's your party. .ovpn or .conf are common.
    – jornane
    Jun 24, 2014 at 18:07
  • if i save it in .ovpn it can be used by openvpn right ?? Jun 24, 2014 at 18:09
  • 1
    @szeitlin Thanks! I've updated the answer
    – jornane
    Apr 5, 2019 at 22:19

Not the answer you're looking for? Browse other questions tagged .