当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [问题]Ubuntu 6.10下有PPTP VPN的拨号连接
帖子发表于 : 2006-12-30 9:44 

注册: 2006-11-21 10:12
帖子: 21
送出感谢: 0 次
接收感谢: 0 次
以前发在“网络基础问题”子版,一直没有得到解决,只好发到这里,请大侠看看。
起因:在公司内网,需通过PPTP VPN拨号上网。
开始是在WinXP下VM虚拟机里安装了Ubuntu,以为是虚拟机和PPP的配合问题,昨天重新分区安装Ubuntu后,还是这个问题。
首先安装client软件,pptp-linux,然后在/etc/ppp/peers目录下建立pptpvpn配置文件,设置内容包括:
取消压缩,require-mppe-128,defaultroute,replacedefaultroute,proxyarp,最后pty调用pptp。
然后在root下执行:pppd call pptpvpn。
执行后,ppp0接口建立,用户认证通过,IP地址正确分配,缺省路由正确替换。
但是,无法上网,也ping不通,2分钟后本端自动释放PPTP connection。用ifconfig可以看到,在VPN自动断线前,在iterface ppp0上发出大量的包,但没有收到的包;用系统监视器可以看到发出的包为1.1MB/s,接收为0。
使用debug参数进行观察,拆线原因:closing control connection due to missing echo reply。
发现IP地址分配后,收到VPN server发来的ECHO Request,本机回复ECHO Reply,但是一分钟之内没有收到VPN Server的回复,然后本端自动释放PPTP connection。
郁闷啊。另外,VPN Server没有问题。log信息如下,请高手看看。

首先是断线前ifconfig看到的信息:
dongyf@dongyf-desktop:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:43:A6:AC:BB
inet addr:135.1**.**.** Bcast:135.1**.**.** Mask:255.255.255.192
inet6 addr: fe80::211:43ff:fea6:acbb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2746 errors:0 dropped:0 overruns:0 frame:0
TX packets:931 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3048135 (2.9 MiB) TX bytes:73228 (71.5 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:146 errors:0 dropped:0 overruns:0 frame:0
TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10852 (10.5 KiB) TX bytes:10852 (10.5 KiB)

ppp0 Link encapoint-to-Point Protocol
inet addr:10.0.4.37 P-t-P:10.0.4.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1496 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:3133394 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:86 (86.0 b) TX bytes:1265891244 (1.1 GiB)

其次,/var/log/debug的内容:
Dec 30 08:55:27 dongyf-desktop pppd[5833]: using channel 2
Dec 30 08:55:28 dongyf-desktop pppd[5833]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe140bd7c> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe140bd7c> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: sent [LCP ConfNak id=0x1 <magic 0x911431f4>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x5e87e6e1> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x5e87e6e1> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MS-v2> <magic 0x96ad8ff5> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: sent [LCP ConfAck id=0x2 <asyncmap 0x0> <auth chap MS-v2> <magic 0x96ad8ff5> <pcomp> <accomp>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe140bd7c> <pcomp> <accomp>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xe140bd7c> <pcomp> <accomp>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [CHAP Challenge id=0x3b <c816d0d56a41a167027ce8ea35b9aa70>, name = "pptpd"]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [CHAP Response id=0x3b <86894be60ee53272597b8970a51eb913b7c170e1b76025eed67c80203f85315e1c56a1956e475250b22c39ea4afc551900>, name = "dongyf"]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [CHAP Success id=0x3b "S=288BD6230F969D036381A3AFB3EAFEEF33BCB437"]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [CCP ConfReq id=0x1 <mppe +H -M +S -L -D -C>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [CCP ConfReq id=0x1 <mppe +H -M +S -L -D -C>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [CCP ConfAck id=0x1 <mppe +H -M +S -L -D -C>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [CCP ConfAck id=0x1 <mppe +H -M +S -L -D -C>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 10.0.4.1>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr 10.0.4.1>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [IPCP ConfNak id=0x1 <addr 10.0.4.37> <ms-dns1 202.100.128.68> <ms-dns3 202.100.128.68>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 10.0.4.37> <ms-dns1 202.100.128.68> <ms-dns3 202.100.128.68>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 10.0.4.37> <ms-dns1 202.100.128.68> <ms-dns3 202.100.128.68>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: Script /etc/ppp/ip-up started (pid 5850)
Dec 30 08:55:31 dongyf-desktop pppd[5833]: Script /etc/ppp/ip-up finished (pid 5850), status = 0x0
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Script pptp 135.1**.**.** --nolaunchpppd finished (pid 5837), status = 0x0
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Script /etc/ppp/ip-down started (pid 5927)
Dec 30 08:57:31 dongyf-desktop pppd[5833]: sent [LCP TermReq id=0x2 "MPPE disabled"]
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Waiting for 1 child processes...
Dec 30 08:57:31 dongyf-desktop pppd[5833]: script /etc/ppp/ip-down, pid 5927
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Script /etc/ppp/ip-down finished (pid 5927), status = 0x0

第三,/var/log/syslog的内容
Dec 30 08:55:27 dongyf-desktop pppd[5833]: pppd 2.4.4 started by root, uid 0
Dec 30 08:55:27 dongyf-desktop pppd[5833]: using channel 2
Dec 30 08:55:27 dongyf-desktop pppd[5833]: Using interface ppp0
Dec 30 08:55:27 dongyf-desktop pppd[5833]: Connect: ppp0 <--> /dev/pts/1
Dec 30 08:55:27 dongyf-desktop pptp[5838]: anon log[main:pptp.c:267]: The synchronous pptp option is NOT activated
Dec 30 08:55:27 dongyf-desktop pptp[5844]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Dec 30 08:55:27 dongyf-desktop pptp[5844]: anon log[ctrlp_disp:pptp_ctrl.c:738]: Received Start Control Connection Reply
Dec 30 08:55:27 dongyf-desktop pptp[5844]: anon log[ctrlp_disp:pptp_ctrl.c:772]: Client connection established.
Dec 30 08:55:27 dongyf-desktop ntpdate[5847]: can't find host ntp.ubuntu.com
Dec 30 08:55:27 dongyf-desktop ntpdate[5847]: no servers can be used, exiting
Dec 30 08:55:28 dongyf-desktop pppd[5833]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe140bd7c> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pptp[5844]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Dec 30 08:55:28 dongyf-desktop pptp[5844]: anon log[ctrlp_disp:pptp_ctrl.c:857]: Received Outgoing Call Reply.
Dec 30 08:55:28 dongyf-desktop pptp[5844]: anon log[ctrlp_disp:pptp_ctrl.c:896]: Outgoing call established (call ID 0, peer's call ID 128).
Dec 30 08:55:28 dongyf-desktop pppd[5833]: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe140bd7c> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: sent [LCP ConfNak id=0x1 <magic 0x911431f4>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x5e87e6e1> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x5e87e6e1> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MS-v2> <magic 0x96ad8ff5> <pcomp> <accomp>]
Dec 30 08:55:28 dongyf-desktop pppd[5833]: sent [LCP ConfAck id=0x2 <asyncmap 0x0> <auth chap MS-v2> <magic 0x96ad8ff5> <pcomp> <accomp>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe140bd7c> <pcomp> <accomp>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xe140bd7c> <pcomp> <accomp>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [CHAP Challenge id=0x3b <c816d0d56a41a167027ce8ea35b9aa70>, name = "pptpd"]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [CHAP Response id=0x3b <86894be60ee53272597b8970a51eb913b7c170e1b76025eed67c80203f85315e1c56a1956e475250b22c39ea4afc551900>, name = "dongyf"]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [CHAP Success id=0x3b "S=288BD6230F969D036381A3AFB3EAFEEF33BCB437"]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: CHAP authentication succeeded
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [CCP ConfReq id=0x1 <mppe +H -M +S -L -D -C>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [CCP ConfReq id=0x1 <mppe +H -M +S -L -D -C>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [CCP ConfAck id=0x1 <mppe +H -M +S -L -D -C>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [CCP ConfAck id=0x1 <mppe +H -M +S -L -D -C>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: MPPE 128-bit stateless compression enabled
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 10.0.4.1>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr 10.0.4.1>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [IPCP ConfNak id=0x1 <addr 10.0.4.37> <ms-dns1 202.100.128.68> <ms-dns3 202.100.128.68>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 10.0.4.37> <ms-dns1 202.100.128.68> <ms-dns3 202.100.128.68>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 10.0.4.37> <ms-dns1 202.100.128.68> <ms-dns3 202.100.128.68>]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: replacing old default route to eth0 [135.1**.**.*]
Dec 30 08:55:31 dongyf-desktop pppd[5833]: Cannot determine ethernet address for proxy ARP
Dec 30 08:55:31 dongyf-desktop pppd[5833]: local IP address 10.0.4.37
Dec 30 08:55:31 dongyf-desktop pppd[5833]: remote IP address 10.0.4.1
Dec 30 08:55:31 dongyf-desktop pppd[5833]: primary DNS address 202.100.128.68
Dec 30 08:55:31 dongyf-desktop pppd[5833]: secondary DNS address 202.100.128.68
Dec 30 08:55:31 dongyf-desktop pppd[5833]: Script /etc/ppp/ip-up started (pid 5850)
Dec 30 08:55:31 dongyf-desktop pppd[5833]: Script /etc/ppp/ip-up finished (pid 5850), status = 0x0
Dec 30 08:56:31 dongyf-desktop pptp[5844]: anon log[logecho:pptp_ctrl.c:676]: Echo Request received.
Dec 30 08:56:31 dongyf-desktop pptp[5844]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 6 'Echo-Reply'
Dec 30 08:57:31 dongyf-desktop pptp[5844]: anon log[pptp_handle_timer:pptp_ctrl.c:1049]: closing control connection due to missing echo reply
Dec 30 08:57:31 dongyf-desktop pptp[5844]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Dec 30 08:57:31 dongyf-desktop pptp[5844]: anon log[pptp_conn_close:pptp_ctrl.c:430]: Closing PPTP connection
Dec 30 08:57:31 dongyf-desktop pptp[5844]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 3 'Stop-Control-Connection-Request'
Dec 30 08:57:31 dongyf-desktop pptp[5844]: anon log[call_callback:pptp_callmgr.c:78]: Closing connection (call state)
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Script pptp 135.1**.**.** --nolaunchpppd finished (pid 5837), status = 0x0
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Modem hangup
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Connect time 2.0 minutes.
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Sent 1339537469 bytes, received 0 bytes.
Dec 30 08:57:31 dongyf-desktop pppd[5833]: restoring old default route to eth0 [135.192.80.1]
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Script /etc/ppp/ip-down started (pid 5927)
Dec 30 08:57:31 dongyf-desktop pppd[5833]: MPPE disabled
Dec 30 08:57:31 dongyf-desktop pppd[5833]: sent [LCP TermReq id=0x2 "MPPE disabled"]
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Connection terminated.
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Waiting for 1 child processes...
Dec 30 08:57:31 dongyf-desktop pppd[5833]: script /etc/ppp/ip-down, pid 5927
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Script /etc/ppp/ip-down finished (pid 5927), status = 0x0
Dec 30 08:57:31 dongyf-desktop pppd[5833]: Exit.


第四,系统信息:
Ubuntu 6.10 Edgy
dongyf@dongyf-desktop:~$ aptitude show ppp
软件包: ppp
状态: 已安装
自动安装: 否
版本号: 2.4.4rel-1ubuntu1
优先级: 标准
部分: base
维护者: Marco d'Itri <md@linux.it>
未压缩尺寸: 1040k
依赖于: libc6 (>= 2.4-1), libpam0g (>= 0.76), libpcap0.8 (>= 0.9.3-1), zlib1g
(>= 1:1.2.1), libpam-modules, libpam-runtime (>= 0.76-13.1), netbase,
procps
冲突: ppp-pam, ppp-udeb, pppdcapiplugin (<= 1:3.7.2005-07-09-2), makedev (<
2.3.1-56)
代替: ppp-pam, ppp-udeb
描述: Point-to-Point Protocol (PPP) daemon
The Point-to-Point Protocol (PPP) provides a standard way to transmit datagrams
over a serial link, as well as a standard way for the machines at either end of
the link (the "peers" to negotiate various optional characteristics of the
link. Using PPP, a serial link can be used to transmit Internet Protocol (IP)
datagrams, allowing TCP/IP connections between the peers.


dongyf@dongyf-desktop:~$ apeitude show pptp-linux
bash: apeitude: command not found
dongyf@dongyf-desktop:~$ aptitude show pptp-linux
软件包: pptp-linux
状态: 已安装
自动安装: 否
版本号: 1.7.0-2ubuntu1
优先级: 可选
部分: net
维护者: Ola Lundqvist <opal@debian.org>
未压缩尺寸: 168k
依赖于: libc6 (>= 2.4-1), ppp (>= 2.4.2)
建议: kernel-patch-mppe
描述: Point-to-Point Tunneling Protocol (PPTP) Client
Client for the proprietary Microsoft Point-to-Point Tunneling Protocol, PPTP.
Allows connection to a PPTP based VPN as used by employers and some cable and
ADSL service providers. MPPE (Microsoft Point-to-Point Encryption) is supported
with the stock kernel.


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2006-12-30 16:26 

注册: 2006-11-21 10:12
帖子: 21
送出感谢: 0 次
接收感谢: 0 次
征集一下,有没有哪位在Ubuntu 6.10下pptp vpn client拨号成功的。
有的话,能交流一下吗?


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2006-12-31 0:53 
头像

注册: 2006-11-24 11:00
帖子: 194
地址: 太阳系第3行星
送出感谢: 0 次
接收感谢: 0 次
我曾经用过,当时也没一次成功,我的经验是要手动抓路由。。比较麻烦


_________________
要爱护linux 就象爱护我们的庄稼地一样


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2006-12-31 16:05 

注册: 2006-11-21 10:12
帖子: 21
送出感谢: 0 次
接收感谢: 0 次
现在的问题是ppp建立不起来,客户端添加路由的问题可以在/etc/ppp/peers下的配置文件里添加:
defaultroute
replacedefaultroute
实现自动添加路由。
加上
usepeerdns
可以自动添加VPN server发送的DNS。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:Bing [Bot] 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译