Ubuntu makes it simple to connect to a Microsoft Windows VPN server at your workplace with NetworkManager and the pptp plugin. Luckily for us Ubuntu users, the right tools are just a couple of clicks or commands away. The first step is to install the network-manager-pptp package. I’ve broken this down into two sections: GUI and CLI installation methods, and Configuration.
Install PPTP with GUI (requires reboot)
Go to the Applications menu, then select Add/Remove… and enter pptp in the search bar.
There it is! Add a checkmark, and hit apply changes. Once the install has completed, reboot your machine and move on to the configuration portion of this guide.
Install PPTP CLI (no reboot required)>
Execute the following commands to:
- install network-manager-pptp
- restart NetworkManager daemon
- restart nm-applet and begin configuring
sudo apt-get install network-manager-pptp
killall nm-applet
sudo /etc/init.d/dbus restart
nm-applet --sm-disable &
Configure Your VPN
After rebooting or restarting NetworkManager and nm-applet, a single click on the nm-applet should reveal a new option, VPN Connections.
Follow the menu, and select Configure VPN then Add a new connection.
Click Forward to begin the configuration. Go ahead and name your connection, then enter the IP address or DNS hostname of the VPN gateway under the Connection tab.
Next, move to the Authentication tab and activate Refuse CHAP.
At this point, the basic configuration is complete. I like to add one more step, however, to ensure that not all of my traffic is routed over the VPN. This can be detrimental for performance. If you’d rather limit your VPN traffic to a specific subnet, go ahead and execute the following:
Under the Routing tab, disable Peer DNS through tunnel (if desired) and enable the option to only use VPN connection for these addresses and enter your network subnet. If the machines on your network use addresses like 192.168.100.X, use something like the following:
192.168.100.0/24
That’s it! You’re done. To connect to the VPN, click the NetworkManager applet, and follow the menus to your newly configured connection. Enter your username, password, and domain, and you should be in business.
Leave comments below if the procedure was any different for you. I’ve tested this on Ubuntu Gutsy 7.10 32 bit and 64 bit.