Connecting to a Microsoft VPN with Linux
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:
- OpenConnect: Cisco VPNs
- OpenVPN: OpenVPN support.
- VPNC: Support for vpnc package.
- Strongswan: IDEv2 IPSec VPNs.
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:
- Uncheck PAP
- Check: CHAP, MSCHAP, MSCHAPv2
- Check "Use Point-to-Point encryption (MPPE)"
- Select 128 bit from the security drop-down.
- Check "Allow stateful encryption".
- Check "Send PPP echo packagets"
- Click OK.
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