When I try to import the VPN
settings from an OVPN
file, I get the following error.
The file "test.ovpn" could not be read or does not contain recognized VPN connection information. Error: Key file contains line "client" which is not a key-value pair, group, or comment
I am quite sure that the line "client" should not be a problem, since I have it in other .ovpn
files as well.
What is wrong with this?
PS: This is the beginning of the ovpn file (with fake data)
client
dev tun
proto tcp
remote xxxxx.yyyyyyyyy.de 443
verify-x509-name "C=de, L=Somewhere, O=mycompanyname AG, CN=xxxxx.yyyyyyyy.de, [email protected]"
route remote_host 255.255.255.255 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass
cipher AES-256-CBC
auth MD5
comp-lzo no
route-delay 4
verb 3
reneg-sec 0
There is a known bug in NetworkManager : configuration files with inline certificates can't be imported.
There are several workarounds which can be taken:
Use the this python script which extract the embedded certificates and rewrite the ovpn config to use separate key and cert files. (reference)
Execute the
ovpn
config using command line:separate lines which contains
port
into several lines:To be:
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:Link https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/606365/comments/95