J'utilise Ubuntu 14.04, aujourd'hui, lorsque je me connecte à mon VPN PPTP, cela a échoué; et je ne sais pas comment le faire.
Je vois les messages suivants dans /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
Après google, j'ai installé network-manager-pptp et network-manager-vpnc.
Cela a fonctionné dans Android et win8.1, mais a juste échoué dans Ubuntu.
Voici quelques exemples de ma configuration vpn: (Je ne peux pas télécharger d’images)
1.J'ai rempli la passerelle VPN, nom d'utilisateur, mot de passe
2.Dans la configuration avancée, j'ai vérifié MPPE et enlevé PAP, CHAP, EAP
quelqu'un peut-il m'aider?
Ou besoin de plus de détails?
après avoir fait Sudo ufw allow proto udp from 199.101.117.111 port 47 to 192.168.2.120 port 47
Cela ne semble pas fonctionner. Voici les informations mises à jour:
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
Je l'ai résolu en resotring mon système et cela fonctionne.
Basé sur la sortie, autorisez le trafic du serveur VPN vers votre PC sur port 47
.
PPTP
user gre (Generic Routing Encapsulation)
protocole. Ce protocole utilise un serveur VPN et envoie des paquets udp
à votre PC sur port 47
. Sans ce protocole, la connexion pptp
n'est pas possible.
Sudo ufw allow proto udp from 199.101.117.111 port 47 to 192.168.2.120 port 47
Ceci est la première étape et, en fonction du résultat et de la configuration de vpn server
, nous pouvons discuter de mppe
, chap
, pap
....
Edit One
Parce que vous n'avez pas de solution de travail avec ma première réponse, essayez d'autoriser tout le trafic depuis le serveur VPN
Sudo ufw allow vpn_server_address
Si vous ne pouvez toujours pas vous connecter, le problème dans nm-pptp-pppd-plugin
est peut-être.
Essayez avec ce script
Créer un fichier avec un nom et le mettre dans
nano name_of_script
scénario
#!/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
Dans le script, modifiez votre adresse IP hôte et ajoutez un réseau ou/et un hôte avec lesquels vous souhaitez vous connecter via vpn
Usage:
Sudo /path_to_script/name_of_script username password
note: définit la permission d'exécution sur le script