Chinaunix首页 | 论坛 | 博客
  • 博客访问: 778471
  • 博文数量: 94
  • 博客积分: 1238
  • 博客等级: 少尉
  • 技术积分: 1174
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-13 19:22
个人简介

走自己的路让别人说去吧!

文章分类

全部博文(94)

文章存档

2015年(4)

2014年(3)

2013年(12)

2012年(32)

2011年(43)

分类: WINDOWS

2011-10-08 19:06:36

一. 什么是PPTP/L2TP

PPTP uses TCP port 1723 for it's control connection and GRE (IP protocol 47) for the PPP data. PPTP supports data encryption by using MPPE.

L2TP uses UDP to transport the PPP data, this is often encapsulated in IPSec for encryption instead of using MPPE.

L2TP支持MP(Multilink Protocol),把多个物理通道捆绑为单一逻辑信道
pptp使用M$的拨号网络作为客户端,使用gre做tunnel封装,MPPE进行加密。


二. 协议区别

在 Microsoft Windows 2003 家族中有两种基于点对点协议 (PPP) 的 VPN 技术。

1. 点对点隧道协议 (PPTP)
PPTP 使用用户级别的 PPP 身份验证方法和用于数据加密的 Microsoft 点对点加密 (MPPE)。
2. 带有 Internet 协议安全性 (IPSec) 的第二层隧道协议 (L2TP)
L2TP 将用户级别的 PPP 身份验证方法和计算机级别的证书与用于数据加密的 IPSec 或隧道模式中的 IPSec(IPSec 本身在其中仅对 IP 通信提供封装)一起使用。

三. Cisco 服务器端上的配置

R1(config)#VPdn enable
R1(config)#vpdn ip udp ignore checksum

R1(config)#vpdn-group 1
R1(config-vpdn)#accept-dialin
R1(config-vpdn-acc-in)#protocol l2tp
R1(config-vpdn-acc-in)#virtual-template 1
R1(config-vpdn)#lcp renegotiation always
R1(config-vpdn)#no l2tp tunnel authentication
R1(config-vpdn)#exit

R1(config)#vpdn-group pptp
R1(config-vpdn)#accept-dialin
R1(config-vpdn-acc-in)#protocol any
R1(config-vpdn-acc-in)#virtual-template 2
R1(config-vpdn-acc-in)#exit
R1(config-vpdn)#exit

R1(config)#username test privilege 6 password 0 test

R1(config)#interface virtual-template 1
R1(config-if)#ip add 192.168.12.252 255.255.255.0
R1(config-if)#peer default ip address pool vpdnpool
R1(config-if)#ppp authentication pap chap
R1(config-if)#exit

R1(config)#interface virtual-template 2
R1(config-if)#ip add 192.168.12.253 255.255.255.0
R1(config-if)#peer default ip address pool pptp
R1(config-if)#ppp encrypt mppe auto
R1(config-if)#ppp authentication pap chap ms-chap ms-chap-v2

R1(config)#ip local pool vpdnpool 192.168.12.100 192.168.12.150
R1(config)#ip local pool pptp 192.168.12.160 192.168.12.180
R1(config)#

四. 配置 PPTP/L2TP client


配置PPTP client
1. 用windows xp(2000) 作为PPTP/L2TP client
2. 右击 “网上邻居”,选择“属性”
3. 在“网络连接”窗口的左边,点击“创建一个新的连接”打开“新建连接向导”窗口
4. 点击“下一步”
5. 选择“连接到我的工作场所的网络”,点击“下一步”
6. 选择“虚拟专用网络连接”,点击“下一步”
7. 填入你想用的连接名(例如:“PPTP”), 点击“下一步”
8. 选择“不拔初始连接”,点击“下一步”
9. 填入PPTP 服务器的主机名或IP,我填IP:172.45.57.6,点击“下一步”
10. 选择一个账户的权限,点击“下一步”
11. 点击“完成”,出现“连接PPTP”窗口
12. 点击“属性”,打开“PPTP属性”窗口
13. 选择“网络”,在“VPN类型”下接框中选择“PPTP VPN”, 点击“确定”
14. 在“连接PPTP”对话框中填入正确的用户名和密码,点击“连接”

配置L2TP client
L2TP client配置和PPTP client的配置很相似。
1. 用windows xp(2000) 作为PPTP/L2TP client
2. 右击 “网上邻居”,选择“属性”
3. 在“网络连接”窗口的左边,点击“创建一个新的连接”打开“新建连接向导”窗口
4. 点击“下一步”
5. 选择“连接到我的工作场所的网络”,点击“下一步”
6. 选择“虚拟专用网络连接”,点击“下一步”
7. 填入你想用的连接名(例如:“L2TP”), 点击“下一步”
8. 选择“不拔初始连接”,点击“下一步”
9. 填入L2TP服务器的主机名或IP,我填IP:172.45.57.6,点击“下一步”
10. 选择一个账户的权限,点击“下一步”
11. 点击“完成”,出现“连接L2TP”窗口
12. 点击“属性”,打开“L2TP属性”窗口
13. 选择“网络”,在“VPN类型”下接框中选择“L2TP IPSec VPN”,点击“确定”
14. 修改注册表:
由于Windows xp(2000)系统缺省情况下启动了IPSec功能,因此在发起VPN请求时应禁止IPSec功能,
在命令行模式下执行regedit命令,弹出“注册表编辑器”对话框。
在左侧注册表项目中逐级找到: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasman\Parameters, 单击Parameters参数,接着在右边窗口空白处单击鼠标右键,选择[新建/双字节值]并新建一个注册表值(名称为ProhibitIPSec,值为1),然后重新启动。
15. 在“连接PPTP”对话框中填入正确的用户名和密码,点击“连接"。

阅读(2876) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~