My setup
I also had the same issue, trying to import on an Ubuntu 16.04 client a .ovpn
file produced by a home pritunl server.
The .ovpn file contained comment lines (#
) as well as inline certificates (<ca>
, <tls-auth>
, <cert>
, <key>
). And there was no apparent reason to remove comments or keys. This same .ovpn
had already been successfully imported into the Kubuntu 16.04 network manager, with only a warning about reneg-sec
being too high; A clue to import issues on Ubuntu 16.04.
Solving the OP's errors
The reneg-sec
value is too high and encounters known import bug:
reneg-sec 2592000
Comment it out or use default value 3600
.
#reneg-sec 2592000
This value can be re-set from Advanced
settings in VPN
config tab under:
The config had two remote
definitions:
remote hostname.org 14195 udp6
remote hostname.org 14195 udp
remote-random
Try with only one:
#remote hostname.org 14195 udp6
remote hostname.org 14195 udp
#remote-random
After these two modifications, there were no import errors.
Further issue with remote
configuration
Although there was no import error any more, the remote was not imported properly, i.e. the port and protocol were not properly parsed, so I had to further break the remote
directive down in the .ovpn file as follows
remote hostname.org
port 14195
proto udp
Summary
My .ovpn file contained comments as well as inline certificates, etc.. After reading some other posts, I thought the problem lied in the inline files or the comments, so I split the inline certificates and keys into separate files and removed all comments.
So in the end, after applying the above fixes, the .ovpn
file with the inline keys and comments was imported.
Best Answer
My problem was that network-manager-openvpn-gnome was not installed, (weird because I though it would get installed automatically after installing network-manager-openvpn). I installed it and everything was fine.
So, to all people having the same problem make sure that
after installing, restart the networking service, e.g. by executing