3

I have got a file <myName>@nnn.nnn.nnn.nnn.ovpn, which was created by a Sophos firewall especially for non-Windows systems.

When I try to create the VPN connection by "adding a stored vpn-configuration", the system tells me something like:

vpn connection could not be imported .... no readable vpn informations.

Even the first line is not accepted:

client
dev tun
proto tcp
remote nnn.nnn.nnn. 443

Setting up the vpn-connection via a terminal window works fine:

sudo openvpn --config <myName>@nnn.nnn.nnn.nnn.ovpn.ovpn

The connection is established,

ifconfig tun0 results in:

tun0      Link encap:UNSPEC  Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet Adresse:10.nnn.2.3  P-z-P:10.nnn.2.3  Maske:255.255.255.0
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:43 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:43 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:100 
          RX-Bytes:4282 (4.2 KB)  TX-Bytes:3524 (3.5 KB)

This doesn't really help, because I don't know how to go on to use this connection.

But I think it confirms that the .ovpn-config-file is ok. This means, that the ubuntu-network-manager does not work.

Can anybody help me?

Greenonline
  • 2,030
  • 8
  • 20
  • 27
con earp
  • 31
  • 1
  • 6
  • Looks like a duplicate of [cannot import saved openVPN configuration file in Ubuntu 16.04 LTS](https://askubuntu.com/q/760345/348964) – Greenonline Aug 19 '21 at 10:28
  • 5
    Does this answer your question? [cannot import saved openVPN configuration file in Ubuntu 16.04 LTS](https://askubuntu.com/questions/760345/cannot-import-saved-openvpn-configuration-file-in-ubuntu-16-04-lts) – Greenonline Aug 19 '21 at 10:29

2 Answers2

4

Maybe it's related to know Bug?

cannot import saved openVPN configuration file in Ubuntu 16.04 LTS

Try commenting out the following line, I was able to successfully import the VPN config:

route remote_host 255.255.255.255 net_gateway default
davidbaumann
  • 1,850
  • 1
  • 17
  • 31
  • As stated in a answer in the question mentioned above, use `sudo nmcli connection import type openvpn file FILE_NAME` to show what is the configuration error. `rror: failed to import 'FILE_NAME.ovpn': configuration error: unsupported 1th argument remote_host to “route” (line 7)` – André M. Faria Nov 29 '21 at 11:59
0

Santiago's answer works. You have to separate the .ovpn file into both certificate and key files and put the files in ~/.cert in Fedora 34.

Greenonline
  • 2,030
  • 8
  • 20
  • 27
  • In Ubuntu 20.04, after commenting the line `route ... default`, while importing the `.ovpn` file, the network manager creates the certificates in the folder `~/.cert/nm-openvpn` automatically. `name-ca.pem`, `name-cert.pem`, `name-key.pem`. – André M. Faria Nov 29 '21 at 12:14