Sponsored Link

This tutorial will explain how to Connect to Windows VPN server (PPTP) with Ubuntu Gutsy.Ubuntu makes it simple to connect to a Microsoft Windows VPN server at your workplace with NetworkManager and the pptp plugin.

Install PPTP Using the following command

sudo aptitude install network-manager-pptp

killall nm-applet

sudo /etc/init.d/dbus restart

nm-applet --sm-disable &

The above command do the following

install network-manager-pptp

restart NetworkManager daemon

restart nm-applet and begin configuring

If you are using kubuntu you need to install the following extra package

sudo aptitude install gnome-network-manager

Configure VPN

After 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

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 connected to your VPN server.

@webmin: this is from network manager home page:
NetworkManager has pluggable support for VPN. There is support for vpnc at the moment. Support for other vpn clients is welcomed.

NetworkManager makes deployment of VPN easy. It supports Cisco .pcf files, so administrators may simply distribute .pcf files to users. The user is able to double click the .pcf file and NetworkManager will import the correct settings for the VPN.

Additionally, NetworkManager can export VPN connections to a .pcf file. Simply create a network in the VPN Connections menu, and then click on the Export button.

I just hope it is possible to make the vpn client auto-connect withouth prompting for password when nm-applet is connected to any given network. And auto reconnect when connectivity is lost and regained. That would solve a lot of user related problems at my company 🙂

I am trying this on my Asus Eee, with eeeXubuntu installed on it. My school has a VPN I would like to connect to. However, I am getting the same issue as I have always gotten, and that is when I put in the first command, to install network-manager-pptp, terminal prompts me to insert the Xubuntu CD. Thats a little difficult when you dont have a cd drive in your laptop. Should it be asking for this in the first place? Thanks for any help. -Cameron

Hi!
As I find the network-manager rather inconvienient for roaming and using different wifi networks, I switched to WICD [wicd.sourceforge.net]. It is better in many ways, but it cannot (yet) handly VPNs. Is there another way to connect to PPTP VPNs without network-manager?
Help is greatly appreciated!
Thank you!

I have the same problem with Windows shares, I cannot explore them. However, if you know your the name of a shared folder, you can mount it using command line:
mount -o username=DOMAIN_LOGIN,password=DOMAIN_PASSWORD //SERVER/FOLDER /root/shared_folder

Kvpnc is what you want. It sets configurations up several VPN types including Cisco and PPTP in a very dial-up networking style of interface. You still have to install the underlying software for the VPN protocol.

Just a quick question might seem annoying but after i did all the steps listed in this page..i found that when i close my terminal window my network manager disappears too..Is there anything I can do to get around this?
R

Well, i used nm to connect to several pptp servers, say windows and linux ones.
What i just can’t do, is route only traffic for the destination lans through the
the tunnel, all traffic goes through the vpn.
So i can’t browse internet, read mail, etc….

I see there are two options to avoid using the dns on the “other side”
1. PPP Options (leave unchecked)
2. the one mentioned here, in Routing. Here i just set the network 10.0.200.0/24
and check Only use VPN connection for these addreses.

I hope this doesn’t come as too n00bish but the VPN connection works and everything is great except the connection seems ungawdly slow. Whether I am using HTTP, FTP or Subversion, any communication seems slower than dialup when connected to the VPN through NM.

I know that I did not change the “Routing” stuff you mentioned because quite honestly I have no idea what my subnet is when connected to the VPN or any of that. That said, could the fact that I did not make the changes in “Routing” be the cause of the unusually slow transfer?