全球主机交流论坛

标题: 手机连不上VPN,请教各位大侠. [打印本页]

作者: skywing    时间: 2010-11-11 16:39
标题: 手机连不上VPN,请教各位大侠.
我的VPN刚搭起来的时候手机使用移动CMNET接入点是能够正常连接的,今天起床后很诡异,怎么连也连接不是.就是连接了WIFI网络(家里的)也连接不上.(电脑上连接正常,就手机不行.)
查看了下服务器端的日志文件,如下
  1. Nov 11 16:33:54 s1 pppd[28434]: LCP terminated by peer (MPPE disabled)
  2. Nov 11 16:33:54 s1 pppd[28434]: Connect time 0.6 minutes.
  3. Nov 11 16:33:54 s1 pppd[28434]: Sent 0 bytes, received 0 bytes.
  4. Nov 11 16:33:54 s1 pptpd[28433]: CTRL: EOF or bad error reading ctrl packet length.
  5. Nov 11 16:33:54 s1 pptpd[28433]: CTRL: couldn't read packet header (exit)
  6. Nov 11 16:33:54 s1 pptpd[28433]: CTRL: CTRL read failed
  7. Nov 11 16:33:54 s1 pppd[28434]: Modem hangup
  8. Nov 11 16:33:54 s1 pppd[28434]: Connection terminated.
  9. Nov 11 16:33:54 s1 pppd[28434]: Exit.
  10. Nov 11 16:33:54 s1 pptpd[28433]: CTRL: Client 117.136.31.182 control connection finished
复制代码

各位大侠帮忙看下问题出在哪里?奇怪了,昨天还连接的好好的.
作者: skywing    时间: 2010-11-11 16:40
另外请教一事,PPTPD的运行记录文件在哪里查看呢?
作者: yywudi    时间: 2010-11-11 16:41
LCP terminated by peer (MPPE disabled)

貌似不支持MPPE
但是手机上的时候强制要加密
看看手机上VPN的设置,把 “强制加密否则断开” (大概是这个意思) 这个选项去掉
作者: ehane    时间: 2010-11-11 16:41
s60?
ios?
andriod?
作者: skywing    时间: 2010-11-11 16:47
原帖由 ehane 于 2010-11-11 16:41 发表
s60?
ios?
andriod?

android
作者: skywing    时间: 2010-11-11 16:49
原帖由 yywudi 于 2010-11-11 16:41 发表
LCP terminated by peer (MPPE disabled)

貌似不支持MPPE
但是手机上的时候强制要加密
看看手机上VPN的设置,把 “强制加密否则断开” (大概是这个意思) 这个选项去掉 ...

我把加密选项勾掉了也不能连接.奇怪了,昨天还好好的.
VPN支持MPPE的,电脑上的连接显示加密 MPPE 128.

[ 本帖最后由 skywing 于 2010-11-11 17:29 编辑 ]
作者: skywing    时间: 2010-11-11 16:55
不要求加密的连接日志文件如下
  1. Nov 11 16:50:58 s1 pptpd[3856]: CTRL: Starting call (launching pppd, opening GRE)
  2. Nov 11 16:50:58 s1 pppd[3868]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
  3. Nov 11 16:50:58 s1 pppd[3868]: pppd 2.4.4 started by root, uid 0
  4. Nov 11 16:50:58 s1 pppd[3868]: Using interface ppp1
  5. Nov 11 16:50:58 s1 pppd[3868]: Connect: ppp1 <--> /dev/pts/2
  6. Nov 11 16:51:03 s1 pppd[3868]: MPPE required but peer negotiation failed
  7. Nov 11 16:51:04 s1 pppd[3868]: Connection terminated.
  8. Nov 11 16:51:04 s1 pppd[3868]: Connect time 0.1 minutes.
  9. Nov 11 16:51:04 s1 pppd[3868]: Sent 10 bytes, received 15 bytes.
  10. Nov 11 16:51:04 s1 pppd[3868]: Exit.
  11. Nov 11 16:51:04 s1 pptpd[3856]: GRE: read(fd=6,buffer=8059680,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
  12. Nov 11 16:51:04 s1 pptpd[3856]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
  13. Nov 11 16:51:04 s1 pptpd[3856]: CTRL: Client 117.136.31.182 control connection finished
复制代码

作者: yywudi    时间: 2010-11-11 18:12
MPPE required but peer negotiation failed
作者: helloworld    时间: 2010-11-11 18:14
手机最好用l2tp
作者: skywing    时间: 2010-11-11 18:23
我晕死了,昨天一切正常的,今天一起床就连不上了
作者: bonecase    时间: 2010-11-11 18:26
之前好像在哪里看到过,Android2.2对MPPE加密支持不好,可以试试不加密呢?
作者: skywing    时间: 2010-11-11 19:07
原帖由 bonecase 于 2010-11-11 18:26 发表
之前好像在哪里看到过,Android2.2对MPPE加密支持不好,可以试试不加密呢?


我的手机是milestone,系统是2.1的
作者: frazy    时间: 2010-11-11 19:24
按照这里试试
http://ubuntuforums.org/archive/index.php/t-224226.html
tuxinvader的回复

[ 本帖最后由 frazy 于 2010-11-11 19:26 编辑 ]
作者: skywing    时间: 2010-11-11 20:28
原帖由 frazy 于 2010-11-11 19:24 发表
按照这里试试
http://ubuntuforums.org/archive/index.php/t-224226.html
tuxinvader的回复


是在 /etc/ppp/options.pptp 添加

  1. man pppd
  2. mppe-stateful
复制代码
吗?英语不是很好
作者: skywing    时间: 2010-11-11 20:36
不行,添加了
man pppd
mppe-stateful
之后连电脑也连接不上了,619错误!
作者: frazy    时间: 2010-11-11 20:59
MPPE required but peer negotiation failed
应该是说你服务器要MPPE,但是你客户端没有加密

你的问题出在“LCP terminated by peer (MPPE disabled)”

要么你服务端不加密先用着,呵呵

[ 本帖最后由 frazy 于 2010-11-11 21:12 编辑 ]
作者: frazy    时间: 2010-11-11 21:35
你的服务端应该是这样默认配置的吧

# BSD licensed ppp-2.4.2 upstream with MPPE only, kernel module ppp_mppe.o
# {{{
refuse-pap
refuse-chap
refuse-mschap
# Require the peer to authenticate itself using MS-CHAPv2 [Microsoft
# Challenge Handshake Authentication Protocol, Version 2] authentication.
require-mschap-v2
# Require MPPE 128-bit encryption
# (note that MPPE requires the use of MSCHAP-V2 during authentication)
require-mppe-128
# }}}

这几个是拒绝的:
refuse-pap
refuse-chap
refuse-mschap,确认你的手机验证方式不要选这几项
作者: skywing    时间: 2010-11-11 21:38
昨天手机还连得好好的,但今天就不行了,期间我也没改动过服务器什么东西.真TMD诡异!
作者: skywing    时间: 2010-11-11 21:44
原帖由 frazy 于 2010-11-11 21:35 发表
你的服务端应该是这样默认配置的吧

# BSD licensed ppp-2.4.2 upstream with MPPE only, kernel module ppp_mppe.o
# {{{
refuse-pap
refuse-chap
refuse-mschap
# Require the peer to authenticate itself using  ...


我查了下,确实是这样配置的,不过手机上的设置很简单的,能让你设置的只有需要不需要加密这一项而已,根本就没有设到这么细...
那我在服务器端把这几行注释掉行不...
作者: frazy    时间: 2010-11-11 21:44
标题: 回复 18# 的帖子
有可能你手机的验证方式选项中既有mschap-v2,又有mschap,自动选择的。昨天mschap-v2ok,今天用了mschap被拒绝了
作者: skywing    时间: 2010-11-12 02:28
原帖由 frazy 于 2010-11-11 21:44 发表
有可能你手机的验证方式选项中既有mschap-v2,又有mschap,自动选择的。昨天mschap-v2ok,今天用了mschap被拒绝了

我现在把手机刷成2.2系统了,连接又正常了,唉,昨天那情况真的是百思不得其解,第一天好好的,第二天一起床就连不上了
作者: bonecase    时间: 2010-11-12 10:13
为什么我的安卓2.2不行呢?
作者: skywing    时间: 2010-11-12 10:33
原帖由 bonecase 于 2010-11-12 10:13 发表
为什么我的安卓2.2不行呢?

在这里给出一个解决MOTO Milestone VPN PPTP连接失败问题的办法
很诡异的情况,今天起床后手机居然无法连接VPN了
看下这两篇文章,看能不能帮到你




欢迎光临 全球主机交流论坛 (https://loc.998820.xyz/) Powered by Discuz! X3.4