Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a .ovpn file with my VPN config - it works fine when I do

sudo openvpn --config ~jrg/Documents/vpn-config.ovpn 

in the terminal, but I'd like to use Network Manager. How can I do this?

share|improve this question
add comment

2 Answers

up vote 10 down vote accepted

First, install the OpenVPN Network Manager plugin:

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

Open Network Manager, select the VPN tab, then click "Import". Navigate to your .ovpn file (~jrg/Documents/vpn-config.ovpn). If it doesn't automatically find your certificates/keys (the paths of which are found in the .ovpn file), you can select them here, or make any other small changes.

openvpn dialog

One other thing that may save you some headache down the road is to click IPv4 Settings, then change the method to "Automatic (VPN) Addresses Only". When kept at the default, this will cause ALL internet traffic to go over the VPN, regardless of your .ovpn settings. Here you can also set the DNS server and search domains to use while connected.

openvpn dialog

share|improve this answer
1  
It doesn't show the certificates and such when I click "Import". –  jrg Sep 13 '12 at 22:35
    
I updated my answer to be a little more thorough. If the options just aren't showing up, than you either have a misconfigured .ovpn and aren't actually using them, or you need to change the "Type" drop-down box. –  reverendj1 Sep 14 '12 at 14:34
    
Were you able to get it to work? –  reverendj1 Sep 19 '12 at 14:14
    
there is a bug in network manager for ovpn files. see bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/… –  lenzai Oct 1 '12 at 10:05
1  
there's no "Import..." button in my case (using debian jessie...) :( –  knocte Jun 7 '13 at 13:33
show 1 more comment

When you aren't given an user certificate, you must select the 'Password' type in the authentication drop down. Then in advanced, in 'TLS Authentication' add the TLS .key file and set the direction accordingly (1 or 0, that should be set in the .ovpn file).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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