2

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-----
1
  • You will have issues because your file embeds the CA cert and the key (and also the 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. Aug 31, 2016 at 22:20

3 Answers 3

0

Even after installing all the plugins for network-manager I still have this error on an occasional 16.04 box. But it is possible to configure it manually. Here are the settings I had to set manually.

On the General page tick the box

enter image description here

On the VPN page enter gateway and your certificate and key files

enter image description here

Then click Advanced button and tick the LZO box.

enter image description here

I did not examine your config file in detail, so change as required to match your server settings.

2
  • I tried manually and got the error mentioned.. org.freedesktop.Notifications[2803]: ** (notify-osd:3163): WARNING **: dnd_is_screensaver_active(): Got error "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
    – Deva
    Sep 1, 2016 at 8:11
  • Sounds like some kind of screensaver error? Sep 1, 2016 at 12:49
0

You could try splitting:

remote vpnserver.abcde.com 1194 udp
remote vpnserver.abcde.com 444 tcp
reneg-sec 604800

In:

remote vpnserver.abcde.com 
port 1194
protocol udp
remote vpnserver.abcde.com 
port 444 
protocol tcp

The value for reneg-sec could be too high as well.

0

What solved all my errors like yours was the following link

https://protonvpn.com/support/linux-openvpn/

Basically, it suggests that you also install resolvconf

sudo apt install resolvconf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.