# Problem with vpn configuration file

**URL:** <https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790>\
**Category:** OpenVPN\
**Created:** [26 April 2022 13:30 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790 "2022-04-26T13:30:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgriksas](https://community.ipfire.org/user_avatar/community.ipfire.org/tgriksas/32/15444_2.png) [@tgriksas](https://community.ipfire.org/u/tgriksas)\
**Post date:** [26 April 2022 13:30 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/1 "2022-04-26T13:30:25Z")

</div>

Hi, I have a problem with vpn. When I create a file and try to import it shows an error. There are no such problems when importing files from OPENVPN — only from ipfire. My osbuntu 22.04

 ![Screenshot from 2022-04-26 16-16-52](https://community.ipfire.org/uploads/default/original/2X/7/734bd91082118fd28e31f685cae17d1cfc60d46c.png)

---

<div class="post-metadata">

**Author:** ![ummeegge](https://community.ipfire.org/user_avatar/community.ipfire.org/ummeegge/32/12650_2.png) [@ummeegge](https://community.ipfire.org/u/ummeegge)\
**Post date:** [26 April 2022 14:07 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/2 "2022-04-26T14:07:12Z")

</div>

Hi tgriksas,  
needed to rewrite this 😉 … ‘–tls-client’ is a N2N directive so it seems that you´ve downloaded the wrong package. If you use a Ubuntu machine which is not setup as a OpenVPN tls-server/tls-client in a peer-to-peer topology you will need a Roadwarrior package (regular server and client topology) and not a N2N one. And even if, the NetworkManager does not know anything about N2N directives since it handles OpenVPN configs only, i think always, as OpenVPN clients with their respective directives (Roadwarriors)…

Hopefully this makes sense to you.

Best,

Erik

---

<div class="post-metadata">

**Author:** ![tgriksas](https://community.ipfire.org/user_avatar/community.ipfire.org/tgriksas/32/15444_2.png) [@tgriksas](https://community.ipfire.org/u/tgriksas)\
**Post date:** [11 May 2022 12:07 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/3 "2022-05-11T12:07:07Z")

</div>

Hi, I’m done with the Roadwarrior package. It doesn’t work anyway. Or can I configure the Ubuntu vpn client manually? How?

---

<div class="post-metadata">

**Author:** ![anon42188109](https://community.ipfire.org/letter_avatar_proxy/v4/letter/a/94ad74/32.png) [@anon42188109](https://community.ipfire.org/u/anon42188109)\
**Post date:** [11 May 2022 13:01 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/4 "2022-05-11T13:01:08Z")

</div>

Have you looked at this page … [wiki.ipfire.org - OpenVPN on IPFire](https://wiki.ipfire.org/configuration/services/openvpn) ? I created a new profile, tomas, added details, it generated a zip file. The zip file has tomas-TO-IPFire.ovpn and tomas.p12 files. Sent that zip to ubuntu client, imported it as VPN using the Network Manager and I can connect using the tomas profile.

```auto
#OpenVPN Client conf
tls-client
client
nobind
dev tun
proto udp
tun-mtu 1500
remote zotac.lan 1194
pkcs12 tomas.p12
cipher AES-256-CBC
auth SHA512
verb 3
remote-cert-tls server
verify-x509-name zotac.lan name
mssfix 0

```

---

<div class="post-metadata">

**Author:** ![tgriksas](https://community.ipfire.org/user_avatar/community.ipfire.org/tgriksas/32/15444_2.png) [@tgriksas](https://community.ipfire.org/u/tgriksas)\
**Post date:** [11 May 2022 13:19 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/5 "2022-05-11T13:19:59Z")

</div>

Yes-it worked with ubuntu 20.04 and with ubuntu 22.04 it doesn’t work that way

---

<div class="post-metadata">

**Author:** ![ummeegge](https://community.ipfire.org/user_avatar/community.ipfire.org/ummeegge/32/12650_2.png) [@ummeegge](https://community.ipfire.org/u/ummeegge)\
**Post date:** [16 May 2022 05:48 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/6 "2022-05-16T05:48:52Z")

</div>

Good morning all,  
since you use now another configuration the error should have been changed. It is difficult to say what the problem is since you did not deliver the logs.

Best,

Erik

---

<div class="post-metadata">

**Author:** ![tgriksas](https://community.ipfire.org/user_avatar/community.ipfire.org/tgriksas/32/15444_2.png) [@tgriksas](https://community.ipfire.org/u/tgriksas)\
**Post date:** [16 May 2022 07:03 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/7 "2022-05-16T07:03:37Z")

</div>

Hi, when I want to import a vpn file, it shows the following error.

 ![Screenshot from 2022-05-16 10-02-30](https://community.ipfire.org/uploads/default/original/2X/1/1b5401ca6e96984cd95ad15320a97db30a625a2d.png)

---

<div class="post-metadata">

**Author:** ![silvio](https://community.ipfire.org/user_avatar/community.ipfire.org/silvio/32/11425_2.png) [@silvio](https://community.ipfire.org/u/silvio)\
**Post date:** [16 May 2022 09:52 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/8 "2022-05-16T09:52:55Z")

</div>

Hi Tomas,

i looks like you want to import the file with the NetworkManager to create the connection.  
I have a Fedora testing system and it does also not work. I have to manually create the connection.

Silvio

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [16 May 2022 11:02 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/9 "2022-05-16T11:02:43Z")

</div>

What result, on the command line, does the command  
`nmcli connection import type openvpn file filefromIPFire.ovpn`  
in Ubuntu or Fedora?

---

<div class="post-metadata">

**Author:** ![tgriksas](https://community.ipfire.org/user_avatar/community.ipfire.org/tgriksas/32/15444_2.png) [@tgriksas](https://community.ipfire.org/u/tgriksas)\
**Post date:** [16 May 2022 11:34 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/10 "2022-05-16T11:34:09Z")

</div>

Here it is

 ![Screenshot from 2022-05-16 14-33-27](https://community.ipfire.org/uploads/default/original/2X/f/f30ab980155d17b36130fd061de014492cf401a7.png)

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [16 May 2022 12:07 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/11 "2022-05-16T12:07:44Z")

</div>

Can you show the contents of the .ovpn file that you are importing.

Which version of IPFire are you running?

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [16 May 2022 12:12 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/12 "2022-05-16T12:12:34Z")

</div>

W tej sytuacji mozna spróbować:

> **[Convert certificates - The IPFire Wiki](https://wiki.ipfire.org/configuration/services/openvpn/extensions/zertkonvert)**

```auto
openssl pkcs12 -in IPFIRE.p12 -clcerts -nokeys -nodes -out user.pem
openssl pkcs12 -in IPFIRE.p12 -nocerts -nodes -out keys.pem
openssl pkcs12 -in IPFIRE.p12 -cacerts -nodes -out ca.pem

```

then in the .ovpn file:

in place of line  
`pkcs12 IPFIRE.p12`  
put

```auto
cert '/PATH to/user.pem'
key '/PATH to/keys.pem'
ca '/PATH to/ca.pem'

```

![obraz](https://community.ipfire.org/uploads/default/original/2X/c/c0b7a995b10a8654dafcda0c2ad76de853e36a59.png)

![obraz](https://community.ipfire.org/uploads/default/original/2X/b/bead8bd8d797c4171e8129e0da614f091a1fc6c9.png)

then try import to NetworkManager.

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [16 May 2022 12:55 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/13 "2022-05-16T12:55:04Z")

</div>

If the pkcs12 file needs to be split up for Network Manager then it must be an older version. That used to apply but for some time I have been able to import pkcs12 files with the line pkcs12 IPFIRE.p12 and it has been imported into my Network Manager with no problems.

My Network Manager version is 1.36.4  
Not sure what version is used in Ubuntu 22.04

Worth a try to split them up and see if that then works.

---

<div class="post-metadata">

**Author:** ![tgriksas](https://community.ipfire.org/user_avatar/community.ipfire.org/tgriksas/32/15444_2.png) [@tgriksas](https://community.ipfire.org/u/tgriksas)\
**Post date:** [16 May 2022 13:36 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/14 "2022-05-16T13:36:36Z")

</div>

When I do openssl pkcs12 -in Topara.p12 -clcerts -nokeys -nodes -out Topara.pem i get this error

 ![Screenshot from 2022-05-16 16-35-18](https://community.ipfire.org/uploads/default/original/2X/e/e727ca45fbbd6effc5f8db80e1177499d547c2df.png)

---

<div class="post-metadata">

**Author:** ![tgriksas](https://community.ipfire.org/user_avatar/community.ipfire.org/tgriksas/32/15444_2.png) [@tgriksas](https://community.ipfire.org/u/tgriksas)\
**Post date:** [16 May 2022 13:37 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/15 "2022-05-16T13:37:59Z")

</div>

How to do this?

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [16 May 2022 14:12 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/16 "2022-05-16T14:12:21Z")

</div>

The error message that you get from trying to convert to pem with openssl, if it is correct, is because your algorithm (RC2-40-CBC) is a 64 bit algorithm which is very weak and easily broken these days. It is also no longer supported by any recent openssl.

What I don’t understand is if that algorithm is correct how you got that key with that algorithm. IPFire’s OpenVPN does not have any 64 bit keys listed on it.

Which encryption key did you select for IPFire’s OpenVPN server?

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [16 May 2022 14:19 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/17 "2022-05-16T14:19:11Z")

</div>

> [@bonnietwin](#):
>
> … how you got that key with that algorithm. IPFire’s OpenVPN does not have any 64 bit keys listed on it.

Is generated when adding an openvpn client to IPFire.  
More information in the topic below:

> [@OVPN Cert creation algo](https://community.ipfire.org/t/ovpn-cert-creation-algo/7911):
>
> Hi, i have an upgraded Fedora 36 system for testing and it is not possible to connect via OpenVPN anymore with my certs. The system uses openssl 3 and for me it looks like the standard methods for the cert creation will not longer supported out of the box. The message i get if i check the p12 file is: [xxx@fedora ovpn]$ openssl pkcs12 -info -in ipfire.p12 Enter Import Password: MAC: sha1, Iteration 2048 MAC length: 20, salt length: 8 PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Ite…

---

<div class="post-metadata">

**Author:** ![tgriksas](https://community.ipfire.org/user_avatar/community.ipfire.org/tgriksas/32/15444_2.png) [@tgriksas](https://community.ipfire.org/u/tgriksas)\
**Post date:** [16 May 2022 14:19 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/18 "2022-05-16T14:19:37Z")

</div>

Here is my algorithm

 ![Screenshot from 2022-05-16 17-18-45](https://community.ipfire.org/uploads/default/original/2X/9/9e28847e4beadacba2cc5dcb92e9261c5824d33b.png)

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [16 May 2022 14:21 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/19 "2022-05-16T14:21:36Z")

</div>

The following link may be helpful:

> **[Troubleshoot PKCS#12 File Installation Failure with Non-FIPS Compliant PBE...](https://www.cisco.com/c/en/us/support/docs/security-vpn/public-key-infrastructure-pki/216234-troubleshoot-pkcs-12-file-installation-f.html)**
>
> This document describes how to troubleshoot the installation failure of a Public Key Cryptography Standards (PKCS)#12 file with non-Federal

---

<div class="post-metadata">

**Author:** ![silvio](https://community.ipfire.org/user_avatar/community.ipfire.org/silvio/32/11425_2.png) [@silvio](https://community.ipfire.org/u/silvio)\
**Post date:** [16 May 2022 14:28 UTC](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790/20 "2022-05-16T14:28:09Z")

</div>

> [@tphz](#):
>
> nmcli connection import type openvpn file filefromIPFire.ovpn

On my Fedora36

> [sfl@fedora ovpn]$ nmcli connection import type openvpn file Silvio-TO-IPFire.ovpn  
> Fehler: Importieren von »Silvio-TO-IPFire.ovpn« ist fehlgeschlagen: The file to import wasn’t a valid OpenVPN configuration (–ca can not be PKCS#12 format).

I run IPFire 167 and created this connection in Jan 2022:  
Network-Manager versions are:  
NetworkManager-openvpn-1.8.18-1.fc36.x86\_64  
NetworkManager-openvpn-gnome-1.8.18-1.fc36.x86\_64

nmcli -v  
nmcli-Werkzeug, Version 1.38.0-1.fc36

Silvio

[Next page](https://community.ipfire.org/t/problem-with-vpn-configuration-file/7790.md?page=2)
