One of the Achilles heels of the Linux operating system is connecting to a VPN. Due to it's natural ability to network, one would think connecting to a VPN would be a simple task. In some cases it is. In some cases it certainly is not.
This is completely dependent upon the type of VPN you are connecting to. That, of course, is the rub. Say you need to connect to a Microsoft VPN. You would think that to be the biggest challenge. It's not. In fact, connecting to a Microsoft PPTP connection is actually quite simple. Say, however, you want to connect to a Sonicwall VPN. Now you're looking at a challenge.
In this article I am going to show you one way to connect to a VPN, via an easy to use GUI. In another article I will outline a second method that will use command line only. Will either method work for you? You can only try and find out.
The GUI that I will be demonstrating a PPTP connection with is an extension of the Network Manager applet. This applet resides in your desktop panel (see Figure 1 - far left icon). I will be demonstrating within the GNOME environment. If you do not already have this applet installed (and you should if you are using a modern GNOME installation) you will need to install it as well. If the Network Manager applet is there, you only need install a single package.
If you do not have the Network Manager installed you will install this (and the required package) with the command:
sudo apt-get install network-manager-gnome network-manager-pptp
If you already have the Network Manager installed remove network-manager-gnome from the above command.
Now issue the command:
sudo NetworkManager restart
If you left click the applet you will now see a VPN menu. Within that VPN menu select Configure to open up the VPN tab of the Network Connections window (see Figure 2).
To set up a new connection click the Add button which will bring up yet another new window. This new window will ask you the connection type. Sine we have only installed PPTP support for Network-Manager you will only have one option from the drop down. You can also install support for:
Search Synaptic for any of the above that you might need.
After clicking Add the next window (see Figure 3) is where you set up all of your options. Most of the configuration should be easy to follow (Gateway, User name, Password, NT Domain) But you do need to click the Advanced tab and do the following:
Once you have made all of your configurations, click Apply and you're ready to connect. Go back and right-click the Network Manager applet and then click the VPN entry which will open up a sub-menu. Select the connection you just created and the connection will attempt to establish. Upon a successful connection you can then attempt to navigate within your VPN. To do so try the Network entry in the Places menu. Your VPN should show up. If it does not hit reload a few times and it should.
Oddly enough, connecting to a Microsoft VPN is often the easiest to connect to from a Linux client. They only get harder from here on out.Advertisement
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.