首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

debian下使用pptp-linux连接pptp服务器

2012-09-24 
debian上使用pptp-linux连接pptp服务器?? 在window下可以很轻松的使用vpn拨号连接,那是因为window xp等已

debian上使用pptp-linux连接pptp服务器
?? 在window下可以很轻松的使用vpn拨号连接,那是因为window xp等已经内置了pptp协议而且内置了客户端,可在linux下,却是没有那么轻松,因为linux下的pptp客户端:pptp-linux有些限制和要求的,以下就我一整天折腾的过程或者算是些许经验在此分享。
首先要去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?? 某些情况克嫩还要自己手动修改路由,可以用route add/del 命令,详细请参考man。
?? 有点要注意:pptp需要iproute的package,debian用户可以google或者apt-get iproute自行安装。 ??? ??/etc/ppp/chap-secrets?

  1. sudo?cat?chap-secrets???
  2. #?Secrets?for?authentication?using?CHAP??
  3. #?client????????server??secret??????????????????IP?addresses??
  4. ?
  5. username?PPTP?password?*??
/etc/ppp/options.pptp?
  1. ?cat?options.pptp???
  2. ###############################################################################??
  3. #?$Id:?options.pptp,v?1.1?2005/02/18?01:40:23?quozl?Exp?$??
  4. #??
  5. #?Sample?PPTP?PPP?options?file?/etc/ppp/options.pptp??
  6. #?Options?used?by?PPP?when?a?connection?is?made?by?a?PPTP?client.??
  7. #?This?file?can?be?referred?to?by?an?/etc/ppp/peers?file?for?the?tunnel.??
  8. #?Changes?are?effective?on?the?next?connection.??See?"man?pppd".??
  9. #??
  10. #?You?are?expected?to?change?this?file?to?suit?your?system.??As??
  11. #?packaged,?it?requires?PPP?2.4.2?or?later?from?http://ppp.samba.org/??
  12. #?and?the?kernel?MPPE?module?available?from?the?CVS?repository?also?on??
  13. #?http://ppp.samba.org/,?which?is?packaged?for?DKMS?as?kernel_ppp_mppe.??
  14. ###############################################################################??
  15. ??
  16. #?Lock?the?port??
  17. lock??
  18. ??
  19. #?Authentication??
  20. #?We?don't?need?the?tunnel?server?to?authenticate?itself??
  21. noauth??
  22. ??
  23. #?We?won't?do?EAP,?CHAP,?or?MSCHAP,?but?we?will?accept?MSCHAP-V2??
  24. #refuse-eap??
  25. #refuse-chap??
  26. #refuse-mschap??
  27. ??
  28. #?Compression??
  29. #?Turn?off?compression?protocols?we?know?won't?be?used??
  30. nobsdcomp??
  31. nodeflate??
  32. ??
  33. #?Encryption??
  34. #?(There?have?been?multiple?versions?of?PPP?with?encryption?support,??
  35. #?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. #?}}}??
/etc/ppp/peers/test?
  1. cat test??
  2. pty?"/home/agile/oss/pptp-linux/pptp hostname --nolaunchpppd"??
  3. name?username??
  4. remotename?PPTP??
  5. require-mppe-128??
  6. defaultroute??
  7. file?/etc/ppp/options.pptp??
  8. ipparam?test?

热点排行