Problem with vpn configuration file

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

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

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

1 Like

Here it is

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

Which version of IPFire are you running?

W tej sytuacji mozna spróbować:

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

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

obraz

obraz

then try import to NetworkManager.

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.

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

How to do this?

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?

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

Here is my algorithm

The following link may be helpful:

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

Thanks @tphz that makes it clear, also your link.

xubuntu VERSION=“22.04 LTS (Jammy Jellyfish)”

command nmcli -v it showed me version 1.36.4
network-manager-openvpn-gnome is already the newest version (1.8.18-1)
network-manager-openvpn is already the newest version (1.8.18-1)

edit:
After updating packages to versions:
nmcli -v = 1.36.4
network-manager-openvpn 1.8.18-3

After command
nmcli connection import type openvpn file filefromIPFire.ovpn
I still get the message:
The file to import wasn’t a valid OpenVPN configuration (–ca can not be PKCS#12 format)

Exactly the same for me

And is it possible manually? How here?

Below is the contents of a sample test.ovpn file
obraz

You select the unzipped file test.p12
Then go to Advanced...

Enter the data from the test.ovpn file into NetworkMnager.

obraz

Tested on Xubuntu 22.04

1 Like

When this started happening to me I just commented out:
mssfix 0
It worked after that.