2007-01-12

PPTP From Ubuntu

Okay, so I wanted to be able to set up PPTP so I could have some kind of vaguely secure connection while at LCA. I have access to a dozen PPTP servers I can bounce through, and I know they work, but I needed to set it up with the ubuntu laptop as the client.

I'm running feisty, if you care.

Steps! This is how to do it:

  1. $ sudo aptitude install network-manager-pptp
  2. Right click -> Remove on the network icon in your systray.
  3. Alt-f2 -> Run 'nm-applet'
  4. Left click on the new network icon -> VPNS -> Configure
    • Add a VPN with the wizard.
  5. The VPN will not appear until you do this:
    • $ /etc/dbus-1/event.d/25NetworkManager restart
    • $ /etc/dbus-1/event.d/26NetworkManagerDispatcher restart
  6. Left click Network Icon -> VPNS -> The VPN you just created.
  7. $ sudo tail -f /var/log/syslog to discover if it worked.

Yay for guis that make everything easy...

I wish I was being sarcastic. I know how much of a hell setting up pptp clients used to be.

31 comments:

Anonymous said...

hello

i am using ubuntu 6.10 & I can not find the network-manager-pptp package...

neither via synaptic package manager nor by your instructions...

Stephen Thorne said...

It's in the universe repository. You'll have to enable that.

http://packages.ubuntu.com/network-manager-pptp

Anonymous said...

Thanks! From Russia with love :D

Anonymous said...

Holy crap! I have yet to get this working since 6.06. I upgraded to feisty 2 weeks ago just for this reason. Never got it work. Checked out your guide and had it functional in 5 min! you rock

BillGod

Anonymous said...

i'm using feisty (not sure which herd number - upgraded my 6.06 to 7.04 thru update-manager).

my problem is i was able to install network-manager-pptp and was able to create a connection through the wizard. my utimately problem is when i click the network icon->VPN Connection ... the profile/connection is shaded and is not clickable.

any idea?

Stephen Thorne said...

Is that still the case even after the network manager restart? Have you tried rebooting the machine?

I need to test these instructions with feisty again I think.

Anonymous said...

the vpn connections we create are greyed when we use a dialup for internet. networkmanager does not see ppp0 in my case, any ideas ??

Anonymous said...

hi,

i am a ubuntu newbie... the network manager icon does not give me the option to delete it from the panel... is there a work-around?

Kim

Anonymous said...

hi again,

a machine restart solved the problem!

Thx,

Kim

Anonymous said...

What gateway is the config looking for? There is a box to type in a gateway, but nothing seems to work????

Alex said...

I can actually connect to the VPN but when I ping the VPN or try to use a terminal server client, it won't budge. Pinging wil result in ping: sendmsg: operation not permitted and the terminal server client just times out. I know this must be a firewall issue (iptables) but you would think that network-manager-pptp would solve this??

Mikhail said...

The connection is created but when I try to connect, it gives me something like "vpn failed to connect" and nothing serious in the syslog

Anonymous said...

I clicked right button but there`s no choice to close it (feisty), just enable the connection check and gray "connection information"...

why?

MoT said...

Anonymous: The gateway that you have to enter is the ip you want to connect to via vpn (i.e. the VPN server)

Also, I had to enable roaming mode for the vpn options to appear, then it worked flawlessly

Hoodia Patch said...

Nice!

Effexor XR said...

Great

Effexor_XR said...

Magnific!

Anonymous said...

Is anyone using this having the following issue with DNS servers setup ?:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/37239

Anonymous said...

Interesting article! Thanks to author!

jpastore said...

went through hell trying to get network-manager-pptp to work. Found:

http://ubuntuforums.org/archive/index.php/t-452649.html

after installing tried to connect to the VPN and I get the following in my /var/log/syslog

NetworkManager: information-^IWill activate VPN connection 'EMD', service 'org.freedesktop.NetworkManager.ppp_starter', user_name 'jpastore', vpn_data 'ppp-connection-type / pptp / pptp-remote / 69.65.65.40 / usepeerdns / no / encrypt-mppe / no / encrypt-mppe-128 / yes / encrypt-mppe-stateful / yes / compress-mppc / no / compress-deflate / no / compress-bsd / no / ppp-lock / yes / ppp-auth-peer / no / ppp-refuse-eap / no / ppp-refuse-chap / no / ppp-refuse-mschap / no / mtu / 1416 / mru / 1416 / lcp-echo-failure / 10 / lcp-echo-interval / 10 / ppp-extra / / ppp-debug / no / usepeerdns-overtunnel / no / routes / 192.168.0.0/24 / use-routes / no', route ''.
Sep 15 23:26:42 jpastore-laptop NetworkManager: WARNING^I nm_vpn_manager_activate_vpn_connection (): nm_vpn_manager_activate_vpn_connection(): no currently active network device, won't activate VPN.
---------------

for other forum posts and doc I turned off use peer dns and peer dns through tunnel.

any help would be greatly appreciated

max said...

thanks for the help - question: I'm using wireless networking but cant get VPN to connect over that. message is "Oct 14 14:22:53 server1 NetworkManager: {WARNING}^I nm_vpn_manager_activate_vpn_connection (): nm_vpn_manager_activate_vpn_connection(): no currently active network device, won't activate vpn "

any thoughts? Do I need to reroute somehow, or will it only work over wired?

Charles M. Norton said...

I am running a fresh install of Feisty, and trying to get network-manager-pptp working. I can create a vpn connection. I am getting these errors.

Oct 12 21:08:03 slapazine NetworkManager: Will activate VPN connection 'arl_vpn', service 'org.freedesktop.NetworkManager.ppp_starter', user_name 'cnorton', vpn_data 'ppp-connection-type / pptp / pptp-remote / 70.88.243.245 / usepeerdns / yes / encrypt-mppe / yes / encrypt-mppe-128 / yes / compress-mppc / no / compress-deflate / no / compress-bsd / no / ppp-lock / yes / ppp-auth-peer / no / ppp-refuse-eap / yes / ppp-refuse-chap / no / ppp-refuse-mschap / no / mtu / 1404 / mru / 1416 / lcp-echo-failure / 10 / lcp-echo-interval / 10 / ppp-extra / / ppp-debug / yes / usepeerdns-overtunnel / yes / routes / 10.100.0.0/16 / use-routes / yes', route '10.100.0.0/16'.
Oct 12 21:08:03 slapazine NetworkManager: WARNING nm_vpn_manager_activate_vpn_connection (): nm_vpn_manager_activate_vpn_connection(): no currently active network device, won't activate VPN.
cnorton@slapazine:~$

Any ideas? What debugging can I turn on, and in which log file would I find it?

Charles M. Norton said...

I tested this at work, where I have a wired ethernet connection. Everything works fine. I'd love to know how to tweak my wired environment at home to achieve the same results.

Ranjit said...

I have wired network connection and i have static IP and i have done everything as said here but still wont connect to my VPN server. Please help to get the connection established, so i can start using ubuntu to do my work. It still gives me the same error " no currently active network device, won't activate VPN. "

Anonymous said...

My syslog says it's trying to make the connection using my username from the client rather than the username on the server that I type into the Authenticate Connection dialog box. I don't see anywhere where I can tell it not to use the client user name.

Mike said...

Good article,

I will try this setup. Today I'm using pptpvpn.org there I get unlimited bandwidth for only €5 a month which is fine.

elizabeth bernot said...

Costa Rica Rafting

World Rafting Championships

us vpn said...

It worked perfectly, thank you very much for sharing a guide.

portable wireless router said...

Thanks! it relly works well!

uk vpn said...

Great guide. Thanks for sharing.

Sarah Neyman said...

I've tested this one and so happy for results, thanks
I'll try to make a guide about top vpn services and this one inside this one