Setting Up a Simple VPN Connection

I get this question often from many: How does one use a Virtual Private Network in Linux?

The easiest way to accomplish this is with the help of Network Manager for both KDE (network-manager-kde) and GNOME (network-manager-gnome).

I'm going to use the GNOME version, however, the KDE variant is very similar. To start, your network must be managed by Network Manager and not through the standard method. You will have to sacrifice a static IP, but in the end you end up with a much easier method of connecting to a VPN.

Next, make sure you have at least one of the following packages installed (highlighted in green):


PPTP should be installed for connecting to a Microsoft Windows VPN server. For a Cisco VPN, use VPNC. For everything else, OpenVPN will suffice.

Once you have them installed, restart Network Manager:

sudo NetworkManager restart

Then, click on the NM icon in your notification area. A new option, "VPN Connections," should be listed. From that menu you may add a VPN or (dis)connect one.


To add a connection, choose Configure VPN... and follow the configuration utility. The only options that should be noted are the name of the connection and the address. In most cases, everything else may be left at the default settings.

When you are finished, the new VPN connection should be listed in the menu (as is DACC above). To connect, simply click on the menu item and type in your username and password.

You should now be able to access all resources as if you were a part of that network. However, this also means that all of your connections are routed through that VPN tunnel. Be sure to disconnect from the network once finished with what you need to do, or you might see a speed hit on your connection.

Now have at it!

Avatar for jacob Jacob Peddicord -

Jacob is a web developer, student, and programmer from Ohio. He is a staff member at the Ubuntu Forums and is most likely a fanboy of the distribution. He loves to write in code and words, play video games, and rant about topics most would have abandoned long ago. Jacob uses GNOME and is never seen running stable software, much to the demise of his laptop.

Home » Articles »

Discussion: Setting Up a Simple VPN Connection

  1. # Posted on 15 October 2007 at 06:56 AM

    [...] Vía | FOSSwire [...]

  2. lefty.crupps (guest)

    # Posted on 17 October 2007 at 05:32 AM

    I tried this in my Kubuntu Feisty, but it didn't work. I have tried countless hours to get a working VPN in Kubuntu, and it has never worked for me, even with the help of the Kvpnc people, when trying with that app.

    I wish this would have worked.

  3. rpcutts (guest)

    # Posted on 30 April 2008 at 05:36 PM

    As ever with Linux nothing is ever as simple as it seems. I did the setup as you describe and the settings are correct as they work from my xp machine.

    When connecting it promps for user and pass which it authenticates fine and connects... apparently... However despite being allegedly connected I cannot ping any of the computers on the VPN.

    "Destination Host Unreachable"

Home » Articles » Setting Up a Simple VPN Connection