【操作系统】Windows综合Win98/DosWin2000/NTWindowsXPWindows2003VistaLinuxUnix注册表Mac

您现在的位置:首页 > 网络学院 > 操作系统 > Linux > 在debian版linux下用pptp 实现VPN

在debian版linux下用pptp 实现VPN

来源: 作者: 日期:2006-08-20

【聚杰网Linux】在debian版linux下用pptp 实现VPN

本文要求读者能够熟练的编译内核
使用的发行版是Debian,内核2.6.8,pppd 2.4.2 pptp 1.5.0

http://anheng.com.cn/news/html/net_admin_blog/413.html 

服务器端设置:
先要给vpn服务器的内核添加mppe补丁,
debian获取补丁:
apt-get install kernel-patch-mppe
然后在当前内核对应的源代码目录,执行修补程序,
#cd /usr/src/kernel-source-2.6.8
#/usr/src/kernel-patches/all/apply/mppe

http://anheng.com.cn/news/html/net_admin_blog/413.html 

在内核的ppp下,会多一个mppe功能,把它编译成模块的形式,并安装,模块形式可以直接挂载,不用启动机器,修改/etc/modules,添加一行
ppp_mppe
安装:pptp服务程序,和设置程序:
apt-get install pptpd webmin-pptp-server
下面就可以直接进webmin对pptpd进行设置了。一切按默认设置,要把
[Enable MPPE encryption?] 选项设置为[Must be used]
这样,就不用修改win客户端的安全默认设置了。
再进行分配ip池,
然后建立账号,根据需要给账号绑定ip
webmin的设置并不能正常工作,最后要在设置文件/etc/pptp.conf中手动添加几个设置,见后页所示

http://anheng.com.cn/news/html/net_admin_blog/413.html 


win客户端设置:
在[网络和拨号连接]进行[新建连接]选[vpn],按默认设置下去就行了。

http://anheng.com.cn/news/html/net_admin_blog/413.html 

linux客户端设置:
先安装客户端软件
apt-get install pptp-linux
安装webmin管理
apt-get install webmin-pptp-client
然后用webmin设置就行了。
客户端自动拨号:
将下面一句放在适当的位置
pptp vpn.anheng.com.cn call anheng &
vpn的接入机器跟局域网的机器在同一网段:
在/etc/pptp.conf中,把localip去掉,remoteip分配一段本网ip,然后/etc/pptp-options里面打开arproxy,把arp传到局域网,就可以了

#debian_3.1 kernel_2.6.8 pptpd_1.2.1 pppd_2.4.2 pptp_linux_1.5.0
#=================================================
#files:/etc/pptpd.conf
speed   1000000
option  /etc/ppp/pptpd-options
localip 10.0.0.254
remoteip        10.0.0.2-238
#end

#==================================================
#files:/etc/ppp/pptpd-options
logfile /var/log/pptpd.log
name pptpd
refuse-eap
proxyarp
nodefaultroute
lock
nobsdcomp
auth
require-mppe
require-mschap
#end

http://anheng.com.cn/news/html/net_admin_blog/413_p2.html 

#=================================================
#file:/etc/ppp/chap-secrets
test  pptpd  test  10.0.0.2
#end

http://anheng.com.cn/news/html/net_admin_blog/413_p2.html 

#=================================================
#file:/etc/modules
...
...
...
ppp_mppe
#end

http://anheng.com.cn/news/html/net_admin_blog/413_p2.html 

#=================================================
#file://etc/modules.conf
...
...
...
...
#end

#file:/etc/ppp/peers/anheng
name USERID
file /etc/ppp/options.pptp
remotename pptpd
require-mppe
require-mppe-40
require-mppe-128

Linux联盟收集整理

评论   点击查看全部评论
您的评论参与,将为聚杰带来更大的动力!请不要吝啬!
快速回复
请使用文明语言让我们维护健康绿色网络环境!

匿名发表   验证码: