分页: 1 / 1

[求助]7.04中设置VPN没有成功,附图

发表于 : 2007-09-02 20:02
relaxssl
方法:
1. 把下面一行加到/etc/apt/source.list
deb http://quozl.netrek.org/pptp/pptpconfig ./
别忘记了后面的./,然后
sudo apt-get install pptpconfig
会根据依赖关系安装大概10个包左右

2. 在终端输入sudo pptpconfig, 出现图形配置界面,作如下配置:
点击Server标签,填入以下各项
Name: 给你的VPN起个名字,随便填
Server: 219.239.104.3 这是师大的VPN IP地址
Domain: 空置不填
User Name: 填入借书证号
Password: 填入借书证密码
点击Routing标签, 选择All to Tunnel
点击DNS标签,去掉Automatic, 并空置下面两栏不填
点击 Encryption标签,去掉所有项
点击ADD,把刚刚做的设置加入VPN配置列表

3. 修改配置文件:
在终端执行sudo gedit /etc/ppp/options.pptp
用#号注释掉下面两句
refuse-chap
refuse-mschap
并将Encrption以下的行全部注释掉

4. 在终端中输入sudo pptpconfig,点击Start
附图:

发表于 : 2007-09-02 20:04
relaxssl

代码: 全选

sudo gedit /etc/ppp/options.pptp
(如果没有注释这个文档的相关内容,将出现另一个错误提示,在3楼)
###############################################################################
# $Id: options.pptp,v 1.1 2005/02/18 01:40:23 quozl Exp $
#
# Sample PPTP PPP options file /etc/ppp/options.pptp
# Options used by PPP when a connection is made by a PPTP client.
# This file can be referred to by an /etc/ppp/peers file for the tunnel.
# Changes are effective on the next connection. See "man pppd".
#
# You are expected to change this file to suit your system. As
# packaged, it requires PPP 2.4.2 or later from http://ppp.samba.org/
# and the kernel MPPE module available from the CVS repository also on
# http://ppp.samba.org/, which is packaged for DKMS as kernel_ppp_mppe.
###############################################################################

# Lock the port
lock

# Authentication
# We don't need the tunnel server to authenticate itself
noauth

# We won't do EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2
refuse-eap
#refuse-chap
#refuse-mschap


# Compression
# Turn off compression protocols we know won't be used
nobsdcomp
nodeflate

# Encryption
# (There have been multiple versions of PPP with encryption support,
# choose with of the following sections you will use. Note that MPPE
# requires the use of MSCHAP-V2 during authentication)

# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras
# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o
# {{{
# Require MPPE 128-bit encryption
#require-mppe-128
# }}}

# http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec
# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o
# {{{
# Require MPPE 128-bit encryption
#mppe required,stateless
# }}}
VPN拨号出现的错误提示:
Re: VPN pptp to Windows VPN server
Same error message here...I see lots of threads with this question but none with the answer. this seems like the common/key error message:

Code:

Using interface ppp0pptpconfig: monitoring interface ppp0

Connect: ppp0 <--> /dev/pts/1
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
pptpconfig: pppd process terminated by signal 16 (failed)
pptpconfig: SIGUSR1


发表于 : 2007-09-02 20:15
relaxssl

代码: 全选

sudo gedit /etc/ppp/options.pptp
###############################################################################
# $Id: options.pptp,v 1.1 2005/02/18 01:40:23 quozl Exp $
#
# Sample PPTP PPP options file /etc/ppp/options.pptp
# Options used by PPP when a connection is made by a PPTP client.
# This file can be referred to by an /etc/ppp/peers file for the tunnel.
# Changes are effective on the next connection. See "man pppd".
#
# You are expected to change this file to suit your system. As
# packaged, it requires PPP 2.4.2 or later from http://ppp.samba.org/
# and the kernel MPPE module available from the CVS repository also on
# http://ppp.samba.org/, which is packaged for DKMS as kernel_ppp_mppe.
###############################################################################

# Lock the port
lock

# Authentication
# We don't need the tunnel server to authenticate itself
noauth

# We won't do EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2
refuse-eap
refuse-chap
refuse-mschap


# Compression
# Turn off compression protocols we know won't be used
nobsdcomp
nodeflate

# Encryption
# (There have been multiple versions of PPP with encryption support,
# choose with of the following sections you will use. Note that MPPE
# requires the use of MSCHAP-V2 during authentication)

# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras
# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o
# {{{
# Require MPPE 128-bit encryption
require-mppe-128
# }}}

# http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec
# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o
# {{{
# Require MPPE 128-bit encryption
#mppe required,stateless
# }}}

VPN拨号出现的错误提示:
Using interface ppp1
pptpconfig: monitoring interface ppp1
Connect: ppp1 <--> /dev/pts/1
CHAP authentication succeeded
MPPE 128-bit stateless compression enabled
Cannot determine ethernet address for proxy ARP

发表于 : 2007-09-03 2:15
rhfcaesar
viewtopic.php?t=21606
试试这个帖子中63楼的办法。

发表于 : 2007-09-03 7:53
relaxssl
rhfcaesar
谢谢,我测试一下。
feisty下的方法:
1. 安装附件里的包。
2. sudo apt-get remove network-manager network-manager-gnome
3. sudo pico /etc/ppp/peers/vpnnet, 添加:
pty "pptp vpn.classnet.cuhk.edu.hk --nolaunchpppd"
##注意: vpn.classnet.cuhk.edu.hk换成你自己的VPN服务器地址
file /etc/ppp/options.pptp
remotename PPTP
persist
defaultroute
usepeerdns
name youruserID
4. sudo pico /etc/ppp/options.pptp, 注释掉 require-mppe-128
5. sudo pico /etc/ppp/pap-secrets, 在最后一行添加:
youruserID PPTP yourpassword
##注意:如果认证方式是chap,那么就编辑chap-secrets文件,而不是pap-secrets。
6. 启动:
sudo pon vpnnet
7. 关闭:
sudo poff vpnnet

发表于 : 2007-09-03 8:09
relaxssl
rhfcaesar
你提供的63楼的方法中的第三步,我不知道如何添加,输入sudo pico /etc/ppp/peers/vpnnet之后,在终端出现的不是gedit的文档,如图

代码: 全选

sudo pico /etc/ppp/peers/vpnnet, 添加:
pty "pptp vpn.classnet.cuhk.edu.hk --nolaunchpppd"
##注意: vpn.classnet.cuhk.edu.hk换成你自己的VPN服务器地址
file /etc/ppp/options.pptp
remotename PPTP
persist
defaultroute
usepeerdns
name youruserID 

发表于 : 2007-09-03 8:34
relaxssl
第二步

代码: 全选

sudo apt-get remove network-manager network-manager-gnome 
执行之后,网络联接图标消失了。

发表于 : 2007-09-03 12:11
rhfcaesar
relaxssl 写了:rhfcaesar
你提供的63楼的方法中的第三步,我不知道如何添加,输入sudo pico /etc/ppp/peers/vpnnet之后,在终端出现的不是gedit的文档,如图

代码: 全选

sudo pico /etc/ppp/peers/vpnnet, 添加:
pty "pptp vpn.classnet.cuhk.edu.hk --nolaunchpppd"
##注意: vpn.classnet.cuhk.edu.hk换成你自己的VPN服务器地址
file /etc/ppp/options.pptp
remotename PPTP
persist
defaultroute
usepeerdns
name youruserID 
把那段代码改一下加入,然后保存退出。如果不知道怎么用nano编辑器,就把pico换成gedit。

发表于 : 2007-09-03 12:12
rhfcaesar
relaxssl 写了:第二步

代码: 全选

sudo apt-get remove network-manager network-manager-gnome 
执行之后,网络联接图标消失了。
还可以用老的网络连接图标,在panel上右键添加即可。