I have recently installed Ubuntu 16.04 and tried to configure OpenVPN client. When I copy the client.conf
file to /etc/openvpn
folder the VPN connection establishes automatically.. But I need to configure it in GUI and installed network-manager-openvpn-gnome
and I'm getting the "Import a saved vpn configuration" menu in choose a connection type tab... The Client profile file is an autologin profile file downloaded from the VPN server.
When I try to import the client.ovpn
I'm getting an error saying that
"Cannot import VPN connection" The file 'client.ovpn' could not be read or does not contain recognized VPN connection information - Error: the plugin does not support import capability.
Contents of client.ovpn
# Automatically generated OpenVPN client config file
# Generated on Sat Aug 31 16:25:23 2016 by openvpnas
# Note: this config file contains inline private keys
# and therefore should be kept confidential!
# Note: this configuration is user-locked to the username below
# OVPN_ACCESS_SERVER_USERNAME=testuser
# Define the profile name of this particular configuration file
# OVPN_ACCESS_SERVER_PROFILE=testuser@vpnserver.abcde.com/AUTOLOGIN
# OVPN_ACCESS_SERVER_AUTOLOGIN=1
# OVPN_ACCESS_SERVER_CLI_PREF_ALLOW_WEB_IMPORT=True
# OVPN_ACCESS_SERVER_CLI_PREF_BASIC_CLIENT=False
# OVPN_ACCESS_SERVER_CLI_PREF_ENABLE_CONNECT=True
# OVPN_ACCESS_SERVER_CLI_PREF_ENABLE_XD_PROXY=True
# OVPN_ACCESS_SERVER_WSHOST=vpnserver.abcde.com:444
# OVPN_ACCESS_SERVER_WEB_CA_BUNDLE_START
# -----BEGIN CERTIFICATE-----
#
# -----END CERTIFICATE-----
# -----BEGIN CERTIFICATE-----
#
# -----END CERTIFICATE-----
# -----BEGIN CERTIFICATE-----
#
# -----END CERTIFICATE-----
# OVPN_ACCESS_SERVER_WEB_CA_BUNDLE_STOP
# OVPN_ACCESS_SERVER_IS_OPENVPN_WEB_CA=0
# OVPN_ACCESS_SERVER_ORGANIZATION=VPN to BANGALORE SERVER
setenv FORWARD_COMPATIBLE 1
client
server-poll-timeout 4
nobind
remote vpnserver.abcde.com 1194 udp
remote vpnserver.abcde.com 444 tcp
dev tun
dev-type tun
ns-cert-type server
reneg-sec 604800
sndbuf 100000
rcvbuf 100000
# NOTE: LZO commands are pushed by the Access Server at connect time.
# NOTE: The below line doesn't disable LZO.
comp-lzo no
verb 3
setenv PUSH_PEER_INFO
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
</key>
key-direction 1
<tls-auth>
#
# 2048 bit OpenVPN static key (Server Agent)
#
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-auth>
## -----BEGIN RSA SIGNATURE-----
## DIGEST:sha256
##
## -----END RSA SIGNATURE-----
tls-auth
which I don't really know much about). Try separating those pieces in files and then apply them after importing the config without certificate and key.