24

I've been using Ubuntu 18.04 for about 3 days now and so far it runs smoothly. I now need to install a VPN for my work, and I got the following files from the sysadmin:

  • ca.crt
  • VPNConfig.ovpn

I first ran sudo apt install openvpn. After that I wanted to install it using the GUI. So I went to the settings app and under "Network" I tried adding a new VPN. It gives the option to "Import from a file". So I selected the VPNConfig.ovpn file, but it says it can't import the file. I also tried importing the ca.crt file and importing the zip in which the two files came, but that didn't work either.

Could anybody help me out as to how I can make this VPN work?

kramer65
  • 2,193

2 Answers2

26

You have to install a few packages first with:

sudo apt install openvpn network-manager-openvpn network-manager-openvpn-gnome

then, restart network-manager

sudo service network-manager restart

and try again. If it doesn't work, then try logging out and back in, if not, then try rebooting.

user8292439
  • 3,878
  • 7
  • 32
  • 57
0

I've had trouble importing .ovpn files as well. It seems to work on some machines and not others. However, it is not difficult to set up the connection using Network Manager. Many critical settings are only accessed after you click on the "Advanced" button, perhaps you didn't look there.

Example
 <general tab>
  Tick "all users may connect to this network"
 <VPN tab>
  Set connection name
  Set server name in Gateway box
  Set type to Certificates (TLS)
  Import user certificate XXX.crt
  Import ca certificate YYY.crt
  Import private key ZZZ.key
  <advanced button> 
   Tick use LZO data compression
   Tick set virtual device type, TUN name tun

If you have other settings look through the tabs to find them.