John's Musings

Yeah, Me Neither

OpenVPN Client on Ubuntu Linux - Why Not Easy?

On the road with my Ubuntu Linux laptop. It’s my camping computer. First and foremost it is fairly easy in itself to connect to your OpenVPN server from the COMMAND LINE, just graphically sucks. Something always goes wrong. Today is no exception.

First my OpenVPN server simply allows me to download the configuration file just by clicking a button. Sweet.

Now all you do is run the .conf file like so:

sudo openvpn —config /path/to/file

Here’s the problem with that. It asks you every time for your user name and password. Yuck.

Then it connects. Swell. I guess. Who remembers their auth password for VPN on a camping trip?

Here’s what you have to do. Back to the command line.

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

Then restart networking or reboot. Now open your Network Connections > Click Add > Then Import a saved VPN configuration > Create

Now navigate to your saved configuration file:

It will open your config file. At this point you should be able to just plug in your user name and password, hit save and forever connect.

HA. Psych. No fucking way. It didn’t work. I found the problem though. See the advanced button? It imported a field incorrectly

Why does stuff never just easily work? See at the bottom where it says “Key Direction 1”? Well that is the correct setting. When I imported this is set that variable to “Key Direction NONE”. Why it didn’t correctly import the key setting I have no idea. I had to look through every single line of the config file and compare it to the graphical interface before I found that. Here's the snippet of code I found the error in. Nothing quite like looking through every line of code in something.

Works fine now. No more password and easy to connect to my OpenVPN server graphically now.

The check mark beside my config file indicates it is connected. Hurray. I win.

blog comments powered by Disqus