如何将Android设备连接到PPTP VPN

前端之家收集整理的这篇文章主要介绍了如何将Android设备连接到PPTP VPN前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用 ubuntu’s guide 创建了一个PPTP VPN服务器.

现在我有:
我现在的问题是我的Android手机无法连接到我创建的pptp.当我尝试输入用户名和密码然后点击连接,我唯一的消息是连接…但后来是不成功.

所以我搜索并找到了这个link,以获得有关如何连接到我的PPTP VPN的一般概述.我也来了here,但我仍然无法将手机连接到VPN.我完全按照ubuntu’s guide的说法,我现在不知道该怎么做,以实现我的目标.请提供一些链接或指南,我应该这样做,我的Android手机将能够连接到我的PPTP VPN.

服务器的syslog

  1. Aug 26 14:44:50 jameshwart-System-Product-Name pptpd[31320]: CTRL: Client 192.168.1.27 control connection started
  2. Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: CTRL: Starting call (launching pppd,opening GRE)
  3. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
  4. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: pppd 2.4.5 started by root,uid 0
  5. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Using interface ppp0
  6. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Connect: ppp0 <--> /dev/pts/24
  7. Aug 26 14:44:51 jameshwart-System-Product-Name NetworkManager[969]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0,iface: ppp0)
  8. Aug 26 14:44:51 jameshwart-System-Product-Name NetworkManager[969]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0,iface: ppp0): no ifupdown configuration found.
  9. Aug 26 14:44:51 jameshwart-System-Product-Name NetworkManager[969]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
  10. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: peer from calling number 192.168.1.27 authorized
  11. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: MPPE required,but MS-CHAP[v2] nor EAP-TLS auth are performed.
  12. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Connection terminated.
  13. Aug 26 14:44:51 jameshwart-System-Product-Name NetworkManager[969]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0,iface: ppp0)
  14. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Exit.
  15. Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: GRE: read(fd=6,buffer=7f2daa2874a0,len=8196) from PTY Failed: status = -1 error = Input/output error,usually caused by unexpected termination of pppd,check option Syntax and pppd logs
  16. Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: CTRL: PTY read or GRE write Failed (pty,gre)=(6,7)
  17. Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: CTRL: Reaping child PPP[31321]
  18. Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: CTRL: Client 192.168.1.27 control connection finished

客户端的syslog

  1. Sent control packet type is 1 'Start-Control-Connection-Request'
  2. Aug 26 14:45:17 felman-To-be-filled-by-O-E-M pptp[10347]: nm-pptp-service-10324 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
  3. Aug 26 14:45:17 felman-To-be-filled-by-O-E-M pptp[10347]: nm-pptp-service-10324 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
  4. Aug 26 14:45:18 felman-To-be-filled-by-O-E-M pptp[10347]: nm-pptp-service-10324 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
  5. Aug 26 14:45:18 felman-To-be-filled-by-O-E-M pptp[10347]: nm-pptp-service-10324 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
  6. Aug 26 14:45:18 felman-To-be-filled-by-O-E-M pptp[10347]: nm-pptp-service-10324 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0,peer's call ID 21504).
  7. Aug 26 14:45:18 felman-To-be-filled-by-O-E-M pppd[10328]: CHAP authentication succeeded
  8. Aug 26 14:45:19 felman-To-be-filled-by-O-E-M pppd[10328]: MPPE 128-bit stateless compression e

options.pptp文件

  1. ###############################################################################
  2. # $Id: options.pptp,v 1.3 2006/03/26 23:11:05 quozl Exp $
  3. #
  4. # Sample PPTP PPP options file /etc/ppp/options.pptp
  5. # Options used by PPP when a connection is made by a PPTP client.
  6. # This file can be referred to by an /etc/ppp/peers file for the tunnel.
  7. # Changes are effective on the next connection. See "man pppd".
  8. #
  9. # You are expected to change this file to suit your system. As
  10. # packaged,it requires PPP 2.4.2 or later from http://ppp.samba.org/
  11. # and the kernel MPPE module available from the CVS repository also on
  12. # http://ppp.samba.org/,which is packaged for DKMS as kernel_ppp_mppe.
  13. ###############################################################################
  14.  
  15. # Lock the port
  16. lock
  17.  
  18. # Authentication
  19. # We don't need the tunnel server to authenticate itself
  20. noauth
  21.  
  22. # We won't do PAP,EAP,CHAP,or MSCHAP,but we will accept MSCHAP-V2
  23. # (you may need to remove these refusals if the server is not using MPPE)
  24. refuse-pap
  25. refuse-eap
  26. refuse-chap
  27. refuse-mschap
  28.  
  29. # Compression
  30. # Turn off compression protocols we know won't be used
  31. nobsdcomp
  32. nodeflate
  33.  
  34. # Encryption
  35. # (There have been multiple versions of PPP with encryption support,# choose with of the following sections you will use. Note that MPPE
  36. # requires the use of MSCHAP-V2 during authentication)
  37.  
  38. # http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras
  39. # ppp-2.4.2 or later with MPPE only,kernel module ppp_mppe.o
  40. # {{{
  41. # Require MPPE 128-bit encryption
  42. #require-mppe-128
  43. # }}}
  44.  
  45. # http://polBox.com/h/hs001/ fork from PPP project by Jan Dubiec
  46. # ppp-2.4.2 or later with MPPE and MPPC,kernel module ppp_mppe_mppc.o
  47. # {{{
  48. # Require MPPE 128-bit encryption
  49. mppe required,stateless
  50. # }}}

解决方法

感谢你们,但我通过检查我的pptpd-options文件解决它并进行更改
#require-mschap-v​​2 to require-mschap-v​​2
#require-mppe-128 to require-mppe-128

我也改变了,删除#就像这样

  1. refuse-pap
  2.  
  3. refuse-chap
  4.  
  5. refuse-mschap

新人更新:

并确保删除noauth选项.在他的情况下,因为它在require-mppe-128和require-mschap-v​​2之前它没有效果但是如果你仍然无法实现它,请检查noauth并将其删除.

猜你在找的Android相关文章