2007-10-17
debian上使用pptp-linux连接pptp服务器
关键字: pptp
在window下可以很轻松的使用vpn拨号连接,那是因为window xp等已经内置了pptp协议而且内置了客户端,可在linux下,却是没有那么轻松,因为linux下的pptp客户端:pptp-linux有些限制和要求的,以下就我一整天折腾的过程或者算是些许经验在此分享。
有点要注意:pptp需要iproute的package,debian用户可以google或者apt-get iproute自行安装。
- 首先要去pptp-linux的官方网站去溜达一下,以好补充一下基本知识,这点需要注意的是pptp 客户端要求内核至少应该是2.6.15(我的是2.6.18),这点我觉得大部分的系统应该满足了 :) ,而且官方文档就linux的各个分支都有详细的文档,我用的是debian,当然是Debian的文档了。
- 接下来就是下载客户端软件了,debian的可以下载其deb版本,不过我觉得好像有点问题,至少在我的系统上好像是有点问题,因此我直接CVS从官方check out了,其编译也很简单:make 一下,一般也就直接生成了pptp执行程序。
- pptp客户端安装好以后,接下来就是繁琐的配置了,不过你可以用pptpconfig或者web-admin等图形化来处理,看个人的喜好了,就我而言,比较喜欢搞清楚内部是怎么回事,因此是手工了。最后是一些相关配置,根据实际情况可以自行修改。
- 启动:sudo pon test
- 停止:sudo poff
有点要注意:pptp需要iproute的package,debian用户可以google或者apt-get iproute自行安装。
/etc/ppp/chap-secrets
- sudo cat chap-secrets
- # Secrets for authentication using CHAP
- # client server secret IP addresses
-
- username PPTP password *
/etc/ppp/options.pptp
- cat 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
- # }}}
/etc/ppp/peers/test
- cat test
- pty "/home/agile/oss/pptp-linux/pptp hostname --nolaunchpppd"
- name username
- remotename PPTP
- require-mppe-128
- defaultroute
- file /etc/ppp/options.pptp
- ipparam test
- 13:35
- 浏览 (574)
- 评论 (0)
- 分类: linux/unix
- 进入论坛
- 相关推荐
发表评论
提醒: 该博客已发表在公共论坛,博客所有留言会成为论坛回贴,留言请注意遵守论坛发贴规则
- 浏览: 85845 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
我的相册
藏民生活体验(做糌粑)
共 5 张
共 5 张
链接
最新评论
-
Groovy 1.6-beta-1发布, ...
def f = gsh.find('.', '-name', '*.java', ...
-- by agile_boy -
Groovy 1.6-beta-1发布, ...
多谢了! 不过在groosh里面似乎不能使用通配符 def gsh = new ...
-- by groovyzhou -
Grails 1.0.3发布
to cauxu 如果要深入了解,还是有必要去了解一下Spring和Hibern ...
-- by agile_boy -
Grails 1.0.3发布
使用Grails 需要熟悉Spring hibernate么?
-- by cauxu -
Grails 1.0.3发布
究竟grails 1.1还发不发呀!我最近都偃旗息鼓,学django去了!感觉g ...
-- by zengsun






评论排行榜