Connecting to a Microsoft VPN with Linux - gHacks Tech News

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.


Figure 1

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

Figure 2

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.

Figure 3

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:

  1. Uncheck PAP
  2. Check: CHAP, MSCHAP, MSCHAPv2
  3. Check "Use Point-to-Point encryption (MPPE)"
  4. Select 128 bit from the security drop-down.
  5. Check "Allow stateful encryption".
  6. Check "Send PPP echo packagets"
  7. 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.

Final thoughts

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.

Connecting to a Microsoft VPN with Linux
Article Name
Connecting to a Microsoft VPN with Linux
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.
Ghacks Technology News

We need your help

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:

Previous Post: «
Next Post: »


  1. Ken said on March 3, 2010 at 4:46 am

    I’d love to see a extra note on which package to install for SonicWall support. (Running Ubuntu 9.10)

  2. Amy McDonald said on June 9, 2010 at 5:42 pm

    thanks for this post. really helpful.

  3. Eduard Baba said on January 17, 2015 at 11:05 pm

    Oddly enough, I can log in to the work server but cannot surf the web nor access shared folders while I am tunnelled. What do you think I am doing wrong?

  4. Aoryu said on March 16, 2016 at 1:52 pm

    Very Helpful. All other pages suggest installing additional software.

    Thanks a lot!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.

Be polite: we do not allow comments that threaten or harass, or are personal attacks. Please leave politics and religion out of discussions!