Cant import ovpn file - Key file contains "client" which is not a key-value pair

There is a known bug in NetworkManager : configuration files with inline certificates can't be imported.

There are several workarounds which can be taken:

  1. Use the this python script which extract the embedded certificates and rewrite the ovpn config to use separate key and cert files. (reference)

  2. Execute the ovpn config using command line:

    sudo openvpn your-ovpn-config-filename.ovpn
    
  3. separate lines which contains port into several lines:

    remote xxxxx.yyyyyyyyy.de 443
    

    To be:

    remote xxxxx.yyyyyyyyy.de 
    port 443
    

Could be because of mssfix 0 option. Per NM's opinion it's wrong. How to check which option is not acceptable? Try from terminal:

# nmcli connection import type openvpn file client1_udp.ovpn
[sudo] password for ipeacocks: 
Error: failed to import 'client1_udp.ovpn': configuration error: invalid 1th argument to “mssfix” where number expected (line 136).

Link https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/606365/comments/95

Tags:

Vpn

Openvpn