# Pfsense OpenVPN and MT300N-V2 (SOLVED)

**URL:** <https://forum.gl-inet.com/t/pfsense-openvpn-and-mt300n-v2-solved/3908>\
**Category:** Router\
**Created:** [June 26, 2018, 6:19pm UTC](https://forum.gl-inet.com/t/pfsense-openvpn-and-mt300n-v2-solved/3908 "2018-06-26T18:19:50Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [June 26, 2018, 8:38pm UTC](https://forum.gl-inet.com/t/pfsense-openvpn-and-mt300n-v2-solved/3908/4 "2018-06-26T20:38:53Z")

</div>

Just to add, the best way is to actually embed the certificate and key into the ovpn file. You can convert your p12 like so:

openssl pkcs12 -in path.p12 -out newfile.crt.pem -clcerts -nokeys  
openssl pkcs12 -in path.p12 -out newfile.key.pem -nocerts -nodes

or if you need to enter a password too:

openssl pkcs12 -in path.p12 -out newfile.crt.pem -clcerts -nokeys -passin ‘pass:P@s5w0rD’

Then you paste the contents of the cert and key like so into the ovpn file:

```
<ca>
-----BEGIN CERTIFICATE-----
***Paste CA Cert Text Here***
 
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
***Paste Your Cert Text Here***
 
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
***Paste Your Cert Private Key Here***
 
-----END PRIVATE KEY-----
</key>

```

You can see my full opvn file here:

> [@Openvpn not started](https://forum.gl-inet.com/t/openvpn-not-started/3475/23):
>
> My config is like this: client dev tun proto tcp-client remote DYNDNS\_ADDRESS 443 float ncp-ciphers AES-128-GCM:AES-256-GCM:AES-128-CBC:AES-256-CBC comp-lzo adaptive keepalive 15 60 auth-user-pass /etc/openvpn/auth/2018893555.txt remote-cert-tls server \<ca\> -----BEGIN CERTIFICATE----- Y9u88kYQUdPyNimnkMBO92nMtqZNAI58WFlQ2QBtblc4a3aaRVh9cQPrdnyHcbtJ wg9w2nSc8t3FfRcwtXGtR699WMt3WH4ZmtKROhUdOtyCGokIMBMihjJOnSvSTWaF sepkZbufWBxSAuqLtbK7hp5rGK1PnvUyJ3oVEUbBlHRyjitdKm9uybiqGGQryDx7 AIVpvrWFPYRTW9682V…

---

_[View the full topic](https://forum.gl-inet.com/t/pfsense-openvpn-and-mt300n-v2-solved/3908)._
