2

I use ubuntu 14.04,Today when I connect to my pptp vpn,it failed;And I do not know how to do it.

I see the following messages in /var/log/syslog:

Apr 14 12:20:29 Lenovo-G470-ubuntu NetworkManager[888]: <info> VPN service 'pptp' disappeared
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]: <info> Starting VPN service 'pptp'...
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 5149
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]: <info> VPN service 'pptp' appeared; activating connections
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]: <info> VPN plugin state changed: init (1)
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]: <info> VPN plugin state changed: starting (3)
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]: <info> VPN connection 'VPN 连接 2' (Connect) reply received.
Apr 14 12:20:45 Lenovo-G470-ubuntu pppd[5153]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
Apr 14 12:20:45 Lenovo-G470-ubuntu pppd[5153]: pppd 2.4.5 started by root, uid 0
Apr 14 12:20:45 Lenovo-G470-ubuntu pppd[5153]: Using interface ppp0
Apr 14 12:20:45 Lenovo-G470-ubuntu pppd[5153]: Connect: ppp0 <--> /dev/pts/15
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Apr 14 12:20:45 Lenovo-G470-ubuntu NetworkManager[888]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Apr 14 12:20:45 Lenovo-G470-ubuntu pptp[5159]: nm-pptp-service-5149 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Apr 14 12:20:45 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Apr 14 12:20:45 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Apr 14 12:20:45 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Apr 14 12:20:46 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Apr 14 12:20:46 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Apr 14 12:20:46 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 53504).
Apr 14 12:20:49 Lenovo-G470-ubuntu kernel: [ 5657.862831] [UFW BLOCK] IN=eth0 OUT= MAC=dc:0e:a1:e2:13:94:28:2c:b2:fc:fd:73:08:00 SRC=199.101.117.111 DST=192.168.2.120 LEN=46 TOS=0x00 PREC=0x00 TTL=47 ID=13330 PROTO=47 
Apr 14 12:20:49 Lenovo-G470-ubuntu kernel: [ 5657.862881] [UFW BLOCK] IN=eth0 OUT= MAC=dc:0e:a1:e2:13:94:28:2c:b2:fc:fd:73:08:00 SRC=199.101.117.111 DST=192.168.2.120 LEN=42 TOS=0x00 PREC=0x00 TTL=47 ID=13331 PROTO=47 
Apr 14 12:20:49 Lenovo-G470-ubuntu kernel: [ 5657.963781] [UFW BLOCK] IN=eth0 OUT= MAC=dc:0e:a1:e2:13:94:28:2c:b2:fc:fd:73:08:00 SRC=199.101.117.111 DST=192.168.2.120 LEN=59 TOS=0x00 PREC=0x00 TTL=47 ID=13332 PROTO=47 
Apr 14 12:21:10 Lenovo-G470-ubuntu kernel: [ 5678.873164] [UFW BLOCK] IN=eth0 OUT= MAC=dc:0e:a1:e2:13:94:28:2c:b2:fc:fd:73:08:00 SRC=199.101.117.111 DST=192.168.2.120 LEN=46 TOS=0x00 PREC=0x00 TTL=47 ID=13345 PROTO=47 
Apr 14 12:21:16 Lenovo-G470-ubuntu pppd[5153]: LCP: timeout sending Config-Requests
Apr 14 12:21:16 Lenovo-G470-ubuntu pppd[5153]: Connection terminated.
Apr 14 12:21:16 Lenovo-G470-ubuntu NetworkManager[888]: <warn> VPN plugin failed: 1
Apr 14 12:21:16 Lenovo-G470-ubuntu NetworkManager[888]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Apr 14 12:21:16 Lenovo-G470-ubuntu pptp[5159]: nm-pptp-service-5149 warn[decaps_hdlc:pptp_gre.c:204]: short read (-1): Input/output error
Apr 14 12:21:16 Lenovo-G470-ubuntu pptp[5159]: nm-pptp-service-5149 warn[decaps_hdlc:pptp_gre.c:216]: pppd may have shutdown, see pppd log
Apr 14 12:21:16 Lenovo-G470-ubuntu pppd[5153]: Modem hangup
Apr 14 12:21:16 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[callmgr_main:pptp_callmgr.c:234]: Closing connection (unhandled)
Apr 14 12:21:16 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Apr 14 12:21:16 Lenovo-G470-ubuntu pptp[5171]: nm-pptp-service-5149 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
Apr 14 12:21:16 Lenovo-G470-ubuntu pppd[5153]: Exit.
Apr 14 12:21:16 Lenovo-G470-ubuntu NetworkManager[888]: <warn> VPN plugin failed: 1
Apr 14 12:21:16 Lenovo-G470-ubuntu NetworkManager[888]: <warn> VPN plugin failed: 1
Apr 14 12:21:16 Lenovo-G470-ubuntu NetworkManager[888]: <info> VPN plugin state changed: stopped (6)
Apr 14 12:21:16 Lenovo-G470-ubuntu NetworkManager[888]: <info> VPN plugin state change reason: 0
Apr 14 12:21:16 Lenovo-G470-ubuntu NetworkManager[888]: <info> Policy set '自动以太网' (eth0) as default for IPv4 routing and DNS.
Apr 14 12:21:16 Lenovo-G470-ubuntu NetworkManager[888]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
Apr 14 12:21:18 Lenovo-G470-ubuntu kernel: [ 5686.892463] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:fb:68:5b:35:81:3d:a1:08:00 SRC=192.168.1.22 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=4346 PROTO=2 
Apr 14 12:21:19 Lenovo-G470-ubuntu kernel: [ 5687.821489] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:fb:68:5b:35:7b:6c:04:08:00 SRC=192.168.2.139 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=28029 PROTO=2 

After google it,I have installed network-manager-pptp and network-manager-vpnc.

It worked in android and win8.1,but just failed in ubuntu.

Here are some my vpn config:(I cannot upload images)
1.I filled out the VPN gateway, username, password
2.In Advanced Configuration,I checked MPPE and removed PAP,CHAP,EAP

can anyone help me?
Or need some more details?

Edit one

after doing sudo ufw allow proto udp from 199.101.117.111 port 47 to 192.168.2.120 port 47
it seems not working.The fllowing is the updated info:

Apr 14 15:11:34 Lenovo-G470-ubuntu NetworkManager[866]: <info> Starting VPN service 'pptp'...
Apr 14 15:11:34 Lenovo-G470-ubuntu NetworkManager[866]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 4423
Apr 14 15:11:34 Lenovo-G470-ubuntu NetworkManager[866]: <info> VPN service 'pptp' appeared; activating connections
Apr 14 15:11:34 Lenovo-G470-ubuntu NetworkManager[866]: <info> VPN plugin state changed: starting (3)
Apr 14 15:11:34 Lenovo-G470-ubuntu NetworkManager[866]: <info> VPN connection 'VPN 连接 2' (Connect) reply received.
Apr 14 15:11:34 Lenovo-G470-ubuntu pppd[4427]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
Apr 14 15:11:34 Lenovo-G470-ubuntu pppd[4427]: pppd 2.4.5 started by root, uid 0
Apr 14 15:11:34 Lenovo-G470-ubuntu pppd[4427]: Using interface ppp0
Apr 14 15:11:34 Lenovo-G470-ubuntu pppd[4427]: Connect: ppp0 <--> /dev/pts/0
Apr 14 15:11:34 Lenovo-G470-ubuntu pptp[4431]: nm-pptp-service-4423 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Apr 14 15:11:34 Lenovo-G470-ubuntu NetworkManager[866]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Apr 14 15:11:34 Lenovo-G470-ubuntu NetworkManager[866]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Apr 14 15:11:34 Lenovo-G470-ubuntu NetworkManager[866]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Apr 14 15:11:34 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Apr 14 15:11:34 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Apr 14 15:11:34 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Apr 14 15:11:35 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Apr 14 15:11:35 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Apr 14 15:11:35 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 55680).
Apr 14 15:11:35 Lenovo-G470-ubuntu kernel: [ 1229.669311] [UFW BLOCK] IN=eth0 OUT= MAC=dc:0e:a1:e2:13:94:28:2c:b2:fc:fd:73:08:00 SRC=199.101.117.111 DST=192.168.2.120 LEN=59 TOS=0x00 PREC=0x00 TTL=47 ID=38683 PROTO=47 
Apr 14 15:11:37 Lenovo-G470-ubuntu kernel: [ 1231.530488] [UFW BLOCK] IN=eth0 OUT= MAC=dc:0e:a1:e2:13:94:28:2c:b2:fc:fd:73:08:00 SRC=199.101.117.111 DST=192.168.2.120 LEN=46 TOS=0x00 PREC=0x00 TTL=47 ID=38684 PROTO=47 
Apr 14 15:11:51 Lenovo-G470-ubuntu dbus[781]: [system] Activating service name='org.freedesktop.hostname1' (using servicehelper)
Apr 14 15:11:51 Lenovo-G470-ubuntu dbus[781]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 14 15:11:51 Lenovo-G470-ubuntu kernel: [ 1246.012237] systemd-hostnamed[4456]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
Apr 14 15:11:54 Lenovo-G470-ubuntu ntfs-3g[4466]: Version 2013.1.13AR.1 external FUSE 29
Apr 14 15:11:54 Lenovo-G470-ubuntu ntfs-3g[4466]: Mounted /dev/sdb8 (Read-Write, label "", NTFS 3.1)
Apr 14 15:11:54 Lenovo-G470-ubuntu ntfs-3g[4466]: Cmdline options: rw,nosuid,nodev,uhelper=udisks2,uid=1000,gid=1000,dmask=0077,fmask=0177
Apr 14 15:11:54 Lenovo-G470-ubuntu ntfs-3g[4466]: Mount options: rw,nosuid,nodev,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb8,blkdev,blksize=4096
Apr 14 15:11:54 Lenovo-G470-ubuntu ntfs-3g[4466]: Global ownership and permissions enforced, configuration type 7
Apr 14 15:11:54 Lenovo-G470-ubuntu udisksd[2762]: Mounted /dev/sdb8 at /media/zerolu/00085E86000034F91 on behalf of uid 1000
Apr 14 15:11:56 Lenovo-G470-ubuntu ntfs-3g[4472]: Version 2013.1.13AR.1 external FUSE 29
Apr 14 15:11:56 Lenovo-G470-ubuntu ntfs-3g[4472]: Mounted /dev/sdb7 (Read-Write, label "", NTFS 3.1)
Apr 14 15:11:56 Lenovo-G470-ubuntu ntfs-3g[4472]: Cmdline options: rw,nosuid,nodev,uhelper=udisks2,uid=1000,gid=1000,dmask=0077,fmask=0177
Apr 14 15:11:56 Lenovo-G470-ubuntu ntfs-3g[4472]: Mount options: rw,nosuid,nodev,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb7,blkdev,blksize=4096
Apr 14 15:11:56 Lenovo-G470-ubuntu ntfs-3g[4472]: Global ownership and permissions enforced, configuration type 7
Apr 14 15:11:56 Lenovo-G470-ubuntu udisksd[2762]: Mounted /dev/sdb7 at /media/zerolu/000538A60008D56E1 on behalf of uid 1000
Apr 14 15:11:56 Lenovo-G470-ubuntu kernel: [ 1250.597804] [UFW BLOCK] IN=eth0 OUT= MAC=dc:0e:a1:e2:13:94:28:2c:b2:fc:fd:73:08:00 SRC=199.101.117.111 DST=192.168.2.120 LEN=46 TOS=0x00 PREC=0x00 TTL=47 ID=38697 PROTO=47 
Apr 14 15:11:58 Lenovo-G470-ubuntu ntfs-3g[4477]: Version 2013.1.13AR.1 external FUSE 29
Apr 14 15:11:58 Lenovo-G470-ubuntu ntfs-3g[4477]: Mounted /dev/sdb9 (Read-Write, label "", NTFS 3.1)
Apr 14 15:11:58 Lenovo-G470-ubuntu ntfs-3g[4477]: Cmdline options: rw,nosuid,nodev,uhelper=udisks2,uid=1000,gid=1000,dmask=0077,fmask=0177
Apr 14 15:11:58 Lenovo-G470-ubuntu ntfs-3g[4477]: Mount options: rw,nosuid,nodev,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb9,blkdev,blksize=4096
Apr 14 15:11:58 Lenovo-G470-ubuntu ntfs-3g[4477]: Global ownership and permissions enforced, configuration type 7
Apr 14 15:11:58 Lenovo-G470-ubuntu udisksd[2762]: Mounted /dev/sdb9 at /media/zerolu/0000A4090008A876 on behalf of uid 1000
Apr 14 15:12:05 Lenovo-G470-ubuntu pppd[4427]: LCP: timeout sending Config-Requests
Apr 14 15:12:05 Lenovo-G470-ubuntu pppd[4427]: Connection terminated.
Apr 14 15:12:05 Lenovo-G470-ubuntu NetworkManager[866]: <warn> VPN plugin failed: 1
Apr 14 15:12:05 Lenovo-G470-ubuntu NetworkManager[866]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Apr 14 15:12:05 Lenovo-G470-ubuntu pppd[4427]: Modem hangup
Apr 14 15:12:05 Lenovo-G470-ubuntu pptp[4431]: nm-pptp-service-4423 warn[decaps_hdlc:pptp_gre.c:204]: short read (-1): Input/output error
Apr 14 15:12:05 Lenovo-G470-ubuntu pptp[4431]: nm-pptp-service-4423 warn[decaps_hdlc:pptp_gre.c:216]: pppd may have shutdown, see pppd log
Apr 14 15:12:05 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[callmgr_main:pptp_callmgr.c:234]: Closing connection (unhandled)
Apr 14 15:12:05 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Apr 14 15:12:05 Lenovo-G470-ubuntu pptp[4445]: nm-pptp-service-4423 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
Apr 14 15:12:05 Lenovo-G470-ubuntu NetworkManager[866]: <warn> VPN plugin failed: 1
Apr 14 15:12:05 Lenovo-G470-ubuntu pppd[4427]: Exit.
Apr 14 15:12:05 Lenovo-G470-ubuntu NetworkManager[866]: <warn> VPN plugin failed: 1
Apr 14 15:12:05 Lenovo-G470-ubuntu NetworkManager[866]: <info> VPN plugin state changed: stopped (6)
Apr 14 15:12:05 Lenovo-G470-ubuntu NetworkManager[866]: <info> VPN plugin state change reason: 0
Apr 14 15:12:05 Lenovo-G470-ubuntu NetworkManager[866]: <info> Policy set '自动以太网' (eth0) as default for IPv4 routing and DNS.
Apr 14 15:12:05 Lenovo-G470-ubuntu NetworkManager[866]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
Apr 14 15:12:10 Lenovo-G470-ubuntu NetworkManager[866]: <info> VPN service 'pptp' disappeared


Edit two

I have solved it by resotring my system and it works.

1
  • If I have some wrong things in my asks please tell me,thanks – zerolu Apr 14 '15 at 6:27
2

Based on output allow traffic from vpn server to your pc on port 47.

PPTP user gre (Generic Routing Encapsulation) protocol. This protocol uses vpn server and send udp packets to your pc on port 47. Without this protocol pptp connection is not possible.

sudo ufw allow proto udp from 199.101.117.111 port 47 to 192.168.2.120 port 47

This is first step, and based on result and vpn server configuration we can discuss about mppe, chap, pap ....

Edit One

Because you don't have working solution with my first answer try to allow all trafic from vpn server

sudo ufw allow vpn_server_address

If still you can not connect, maybe is problem in nm-pptp-pppd-plugin.

Try with this script

Create file with some name and put in

nano name_of_script

script

#!/bin/bash
function routeadd {
    route add -host xxx.xxx.xxx.xxx dev ppp0
    route add -net xxx.xxx.xxx.xxx/xx dev ppp0
}
function makepptp {
   echo pty \"pptp xxx.xxx.xxx.xxx --nolaunchpppd\" >> /etc/ppp/peers/vpn;
   echo remotename PPTP >> /etc/ppp/peers/vpn;
   echo require-mppe-128 >> /etc/ppp/peers/vpn;
   echo file /etc/ppp/options.pptp >> /etc/ppp/peers/vpn;
   echo ipparam vpn >> /etc/ppp/peers/vpn;
pppd call vpn &
}
if [ -a /etc/ppp/chap-secrets ];
        then
        rm /etc/ppp/chap-secrets
    echo $1 PPTP $2 '*' >> /etc/ppp/chap-secrets;
else
    echo $1 PPTP $2 '*' >> /etc/ppp/chap-secrets;
fi

if [ -e /etc/ppp/peers/vpn ];
    then
    rm /etc/ppp/peers/vpn;
    echo name $1 >> /etc/ppp/peers/vpn;
    makepptp;
    sleep 8;
    routeadd;
else
    echo name $1 >> /etc/ppp/peers/vpn;
    makepptp;
    sleep 8;
    routeadd;
fi

In script change you host ip and add network or/and host witch you wish to connect via vpn

Usage:

sudo /path_to_script/name_of_script username password

note: set execute permision to script

5
  • Firstly,Thanks for your answer,I have tried your way,and it seems not works,what else do you need – zerolu Apr 14 '15 at 7:19
  • I add edit one in answer. Try. – 2707974 Apr 14 '15 at 7:33
  • Sorry for replying to you late.I have solved my problem but without your way.Thanks for your solution. – zerolu Apr 14 '15 at 10:37
  • @zerolu how did you solve it? – Jas Jun 11 '15 at 14:40
  • restore ubuntu system – zerolu Jun 13 '15 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.