fc2破解版手机客户端fc2手机客户端

太平洋在线下载 225 3

CiscoEasyVPN的三种模式的论述

VPN_REMOTE#配置文档及注释

cryptoipsecclientezvpncisco//定义客户端ezvpn名字为cisco

connectauto//定义连接方式为自动连接groupezvpnkeycisco123

modenetwork-plus//定义模式为network-plus方式

peer211.161.1.2//定义vpnServer端IP地址

usernameciscopasswordccie//定义vpnServer本地验证用户名密码匹配

xauthuseridmodelocal//定义扩展验证用户验证方式(协商1.5)

interfaceLoopback1

ipaddress172.16.1.4255.255.255.255//自动生成Loopback口做PAT(仅

client模式和network-plus模式)

interfaceFastEthernet0/0

ipaddress211.161.1.1255.255.255.252//ISP外网接口

noipredirects//关闭ip直连

noipunreachables

speed100

full-duplex

cryptoipsecclientezvpnciscooutside//定义ezvpnoutsidePAT端口

!

interfaceFastEthernet0/1

ipaddress10.10.10.1255.255.255.0//局域网内网接口

noipredirects

noipunreachables

speedauto

full-duplex

cryptoipsecclientezvpnciscoinside//定义ezvpninsidePAT端口

iproute0.0.0.00.0.0.0211.161.1.2//定义外网默认路由

-------------------------------------------------------------------

VPN_SERVER#配置文档及注释

usernameciscopassword0ccie//定义Local用户名 cisco密码 ccie

cryptoisakmppolicy10//定义isakmp阶段1策略10

encr3des//定义加密方式为3倍的Des

authenticationpre-share//定义验证方式为预共享

group2//定义isakmp密钥为1024bit

cryptoisakmpclientconfigurationgroupezvpn//定义isakmpRemote端

的组名为ezvpn

keycisco123//定义密钥.(预共享的弊端)

domaincisco.com//定义域名

poolvpn-pool//定义地址池为本地pool为vpn-pool

aclsplit-tunnel//定义分离通道 split-tunnel

save-password//定义密码保存s

cryptoipsectransform-setccspesp-3desesp-sha-hmac//定义isakmp阶

段2的加密和校验方式

cryptodynamic-mapezvpn-dy10//定义动态策略图为vpnmap10

settransform-setccsp//定义绑定transfor-setccsp

reverse-route//定义路由注入s

cryptomapciscoclientauthenticationlistezvpn-au//定义cryptomap

客户端验证为ezvpn-au组的方式

cryptomapciscoisakmpauthorizationlistezvpn-au//定义cryptomap

isakmp验证为ezvpn-au组的方式

cryptomapciscoclientconfigurationaddressrespond//定义cryptomap

客户端地址响应

cryptomapcisco10ipsec-isakmpdynamicezvpn-dy//定义cryptomap

ipsec-isakmp为动态ezvpn-dy

interfaceFastEthernet0/0

ipaddress211.161.1.2255.255.255.252//ISP地址

noipredirects

noipunreachables

noipproxy-arp

speed100

full-duplex

cryptomapcisco//匹配策略图cisco

interfaceFastEthernet0/1

ipaddress10.20.20.1255.255.255.0//定义内网地址

noipredirects

noipunreachables

speed100

full-duplex

iplocalpoolvpn-pool172.16.1.1172.16.1.100//定义拨入地址vpn用户地址池

iproute0.0.0.00.0.0.0211.161.1.1//定义ISP外网默认路由

iproute20.20.20.20255.255.255.255FastEthernet0/1//定义内网静态路

ipaccess-listextendedsplit-tunnel//定义感兴趣流量VPN通道

permitip211.161.1.00.0.0.3any

permitip10.20.20.00.0.0.255any

permitip20.20.20.00.0.0.255any

permitiphost2.2.2.2any

--------------------------------------------------------------------

---------------------------------------

//用一台路由器来模拟内网的FileServer

FileServer#

interfaceLoopback0

ipaddress20.20.20.20255.255.255.255//测试Loopback地址

interfaceFastEthernet0/0

ipaddress10.20.20.20255.255.255.0//内网地址

noipredirects

noipunreachables

speed100

full-duplex

interfaceFastEthernet1/0

noipaddress

shutdown

duplexauto

speedauto

!

ipclassless

iproute0.0.0.00.0.0.010.20.20.1//定义默认路由

iphttpserver//打开httpWeb80服务

--------------------------------------------------------------------

---------------------------------------

实验结果fc2破解版手机客户端

VPNRemote[Client]配置:

cryptoipsecclientezvpncisco

modeClient

EasyVPNRemote端会出现loopback口fc2破解版手机客户端,当有用户需要访问EasyVPNServer

后面的主机时fc2破解版手机客户端,EasyVPNRemote会自动用loopback接口的地址做PAT;如果

Server上设置了splittunnel,当Remote后面有用户需要访问Internet主机

时,EasyVPNRemote会自动用外网接口的地址做PAT。client模式,vpnclient

端内部网络采用nat方式与vpnserver进行通信,vpnclient端网络可以访问

server端网络资源,server端网络不能访问client端内部网络资源.

VPNRemote[Network-extension]配置:

cryptoipsecclientezvpncisco

modeNetwork-extension

EasyVPNRemote端不会出现loopback口,vpnserver和vpnclient两端的

内部网络之间可以通过ip地址互相访问.network-extension模式,Vpnserver

端和Vpnclient端封装IPsec加密数据在两者之间,和Site-to-Site类似.不同

的是Remote端可以用Vpn-client登录Server端.VPNRemoteClient模式和

network-extension还有一个区别就是Client模式对用户呈现的是一个域,而

Network-extension模式对用户呈现的是具体的路由信息.

VPNRemote[Network-plus]配置:

cryptoipsecclientezvpncisco

modeNetwork-plus

Network-extension一样效果,然而Remote端依然会创建loopback口,但是这

个接口此时仅用于troubleshooting

常用调试命令:

showcryipclientezvpn

clearcryipclientezvpn

debcryipclientezvpn

showcryipsa

debcryisa

showcryisasa

showipnatstatistics

EASYVPN配置

XX 公司,现在因为工作业务需求,需要搭建 VPN,因为出差的用户比较多,而且又不同的客户,因为不同的客户和公司的业务关系也不一样。所以需要对于不同的用户,部署不同的

VPN策略,在此给 XX公司部署 Easy VPN,比较节省成本。使用 SDM(cisco安全设备管理,图形界面软件)来调试 VPN公司拓扑:

实验过程:

第一步 R1的预配置R1(config)#int e1/0R1(config-if)#ip add 192.168.1.200 255.255.255.0R1(config-if)#no shR1(config-if)#int f0/0R1(config-if)#ip add 172.16.0.1 255.255.255.0R1(config-if)#no shR1(config-if)#exitR1(config)#R1(config)#ip http server 启用 http服务,用于 SDM登陆R1(config)#ip http authentication enable http认证采用 enable密码来做认证

R1(config)#lin vty 0 4 进入 VTY接口下R1(config-line)#transport input ssh telnet 配置 SSH和 telnetR1(config-line)#login local 登陆采用本地认证R1(config-line)#end第二步 在 SDM中添加一个新的用户以便开启 AAA

第三步 输入用户名和密码,将用户的权限设置为 Level 15

第四步 在 SDM上开启 AAA服务

第五步 开始 SDM配置 Easy VPN Server,在 VPN¡ú Easy VPN Server¡ú启动 Easy VPN服务向导

第六步 在 Easy VPN Server服务向导中点击下一步

第七步 在接口和验证中选择接口为 FashEthernet0/0,认证方式选择为预共享密钥

第八步 在 IKE策略中选择默认

第九步 在转换集中选择默认

第十步 在组授权和组策略查找中选择本地

第十一步 在用户验证中选择仅限本地

第十二步

组授权和用户组策略中选择添加

第十三步 配置组策略

第十四步 确认无误后点结束

第十五步 查看 shou run实际执行效果

R1#show run

Building configuration...

Current configuration : 2094 bytes

!

upgrade fpd auto

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R1

!

boot-start-marker

boot-end-marker

!

!

aaa new-model

!

!

aaa authentication login default local

aaa authentication login sdm_vpn_xauth_ml_1 local

aaa authorization exec default local

aaa authorization network sdm_vpn_group_ml_1 local

!

!

aaa session-id common

ip cef

!

!

no ip domain lookup

ip auth-proxy max-nodata-conns 3

ip admission max-nodata-conns 3

!

multilink bundle-name authenticated

!

!

username norvel privilege 15 secret 5 $1$EMdL$.RYjaI5OlA40s8rq0FsMJ/

archive

log config

hidekeys

!

!

crypto isakmp policy 1

encr 3des

authentication pre-share

group 2

!

crypto isakmp client configuration group sdmeasyvpn

key cisco

pool SDM_POOL_1

crypto isakmp profile sdm-ike-profile-1

match identity group sdmeasyvpn

client authentication list sdm_vpn_xauth_ml_1

isakmp authorization list sdm_vpn_group_ml_1

client configuration address respond

virtual-template 1

!

!

crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac

!

crypto ipsec profile SDM_Profile1

set transform-set ESP-3DES-SHA

set isakmp-profile sdm-ike-profile-1

!

!

interface FastEthernet0/0

ip address 172.16.0.1 255.255.255.0

duplex half

!

interface Ethernet1/0

ip address 192.168.1.200 255.255.255.0

duplex half

!

interface Ethernet1/1

no ip address

shutdown

duplex half

!

interface Ethernet1/2

no ip address

shutdown

duplex half

!

interface Ethernet1/3

no ip address

shutdown

duplex half

!

interface Virtual-Template1 type tunnel

ip unnumbered FastEthernet0/0

tunnel mode ipsec ipv4

tunnel protection ipsec profile SDM_Profile1

!

ip local pool SDM_POOL_1 192.168.0.100 192.168.0.150

ip forward-protocol nd

ip http server

no ip http secure-server

!

!

!

logging alarm informational

!

!

control-plane

!

!

gatekeeper

shutdown

!

!

line con 0

exec-timeout 0 0

logging synchronous

stopbits 1

line aux 0

stopbits 1

line vty 0 4

transport input telnet ssh

!

!

end

第十六步 配置 VPN Client

第十七步 点击 VPN连接,连接后要求输入密码

第十八部 连接后状态

二:SSLVPNServer配置

软件版本:> CiscoIOSSoftware,7200Software

(C7200-ADVSECURITYK9-M),Version12.4(9)T1,RELEASESOFTWARE(fc2)

VPN客户端软件:sslclient-win-1.1.2.169.pkg

1、格式化 disk0

R1#formatdisk0:

Formatoperationmaytakeawhile.Continue?[confirm]

Formatoperationwilldestroyalldatain"disk0:". Continue?

[confirm]

Format:Drivecommunication&1stSectorWriteOK...

WritingMonlibsectors.

.................................................................

.....................................................................

........

Monlibwritecomplete

Format:Allsystemsectorswritten.OK...

Format:Totalsectorsinformattedpartition:8009

Format:Totalbytesinformattedpartition:4100608

Format:Operationcompletedsuccessfully.

Formatofdisk0complete

2、上传软件

R1#copytftpdisk0:

Addressornameofremotehost[]?192.168.10.100

Sourcefilename[]?sslclient-win-1.1.2.169.pkg

Destinationfilename[sslclient-win-1.1.2.169.pkg]?

Accessingtftp://192.168.10.100/sslclient-win-1.1.2.169.pkg...

Loadingsslclient-win-1.1.2.169.pkgfrom192.168.10.100(via

FastEthernet0/0):!!

[OK-415090bytes]

415090bytescopiedin12.892secs(32197bytes/sec)

3、安装 client软件

R1(config)#webvpninstallsvcdisk0:/sslclient-win-1.1.2.169.pkg

SSLVPNPackageSSL-VPN-Client:installedsuccessfully

4、配置 SSLVPN

R1(config)#aaanew-model

R1(config)#aaaauthenticationlogindefaultlocal //为防止控制

台超时而造成无法进入Exec

R1(config))#aaaauthenticationloginwebvpnlocal

R1(config)#iplocalpoolssl-add11.1.1.1011.1.1.20

R1(config)#usernameuser1password123 //定义WebVPN本地认证用

户名,密码

R1(config))#webvpngatewayvpngateway//定义WebVPN在哪个接口上进

行监听,此时IOS会自动产生自签名证书。

R1(config-webvpn-gateway)#ipaddress192.168.10.10port443

R1(config-webvpn-gateway)#inservice//启用webvpngateway配置

R1(config)#webvpncontextwebcontext //定义webvpn的相关配置,

相当于ASA的tunnel-group,在这里可以定义

R1(config-webvpn-context)#gatewayvpngateway//将context和

gateway相关联

R1(config-webvpn-context)#aaaauthenticationlistwebvpn

R1(config-webvpn-context)#inservice//启用webvpncontext配置

R1(config-webvpn-context)#policygroupsslvpn-policy//进入sslvpn

策略组

R1(config-webvpn-group)#functionssvc-enabled

R1(config-webvpn-group)#svcaddress-poolssl-add//分配svc使用的

地址池

R1(config-webvpn-group)#svcsplitinclude192.168.20.0

255.255.255.0//定义隧道分离的目标地址,如果不配置,则默认为0.0.0.0

R1(config-webvpn-group)#exit

R1(config-webvpn-context)#default-group-policysslvpn-policy//

当配置了多个policygroup后,默认使用的策略组

注意:

在IOS中,如果地址池不和内网在一个段,则需创建一个和地址池在同一网

段的loopback接口作为vpn客户端的网关。

还可以在context中指定virtual-host,类似于iis中的文件头,允许多

个主机映射到同一个IP地址

同时context中还可以设置web登陆框的样式,比如logo,title等

5、完整配置

R1#showrunning-config

Buildingconfiguration...

Currentconfiguration:3223bytes

!

version12.4

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameR1

!

boot-start-marker

boot-end-marker

!

!

aaanew-model

!

!

aaaauthenticationlogindefaultlocal

aaaauthenticationloginwebvpnlocal

!

aaasession-idcommon

!

resourcepolicy

!

ipcef

!

!

!

cryptopkitrustpointTP-self-signed-4294967295

enrollmentselfsigned

subject-namecn=IOS-Self-Signed-Certificate-4294967295

revocation-checknone

rsakeypairTP-self-signed-4294967295

!

!

cryptopkicertificatechainTP-self-signed-4294967295

certificateself-signed01

3082023A308201A3A003020102020101300D06092A864886F70D0101

04050030

31312F302D06035504031326494F532D53656C662D5369676E65642D

43657274

696669636174652D34323934393637323935301E170D303831323135

31393039

30335A170D3230303130313030303030305A3031312F302D06035504

03132649

4F532D53656C662D5369676E65642D43657274696669636174652D34

32393439

363732393530819F300D06092A864886F70D010101050003818D0030

81890281

8100C6F2B499879D1CEB3638BA59B459A72167BBFDD2CD733E3E6FB6

D1347E43

8CC21C65BAC01E285001349771CF8062C54F254CA6DB2D5ACDDB864D

CFF71A50

F3C205661405E49B18CE2DAB469C58E85B4A1FD659DCBCA512A34543

4F6842B6

24B9A7BDCE36E98AA5463EB32D2C5BC0FAA247C1E44DB4554537465F

18895A14

66D10203010001A3623060300F0603551D130101FF040530030101FF

300D0603

551D110406300482025231301F0603551D230418301680149F7F1B46

F6903BC5

803F4AD72433EBD05813E29D301D0603551D0E041604149F7F1B46F6

903BC580

3F4AD72433EBD05813E29D300D06092A864886F70D01010405000381

81002516

3F75E2AA335441139A9179DBDFED2529DF5A972FC2BFDE0E0279D1F5

8D30CAC7

59BE79C685825281AB2D0B082CA84D0185A4DB198977BC829E59F764

ADE75E22

9A7FF37A9D83819A2287BE75773FAA32D38DD3C22C0DF23F7D45D7A3

E8006C1A

6B9E0540124832416EEAA0FFB31240F394044BCB75210037FEF5AD15

F49B

quit

usernameuser1password0123

!

!

!

!

!

!

interfaceLoopback0

ipaddress11.1.1.1255.255.255.0

!

interfaceFastEthernet0/0

ipaddress192.168.10.10255.255.255.0

duplexhalf

!

interfaceSerial1/0

ipaddress10.1.1.1255.255.255.0

serialrestart-delay0

!

interfaceSerial1/1

noipaddress

shutdown

serialrestart-delay0

!

interfaceSerial1/2

noipaddress

shutdown

serialrestart-delay0

!

interfaceSerial1/3

noipaddress

shutdown

serialrestart-delay0

!

routerrip

version2

network10.0.0.0

network11.0.0.0

network192.168.10.0

noauto-summary

!

iplocalpoolssl-add11.1.1.1011.1.1.20

noiphttpserver

noiphttpsecure-server

!

!

!

loggingalarminformational

!

!

!

!

!

control-plane

!

!

linecon0

exec-timeout00

stopbits1

lineaux0

stopbits1

linevty04

!

!

webvpngatewayvpngateway

ipaddress192.168.10.10port443

ssltrustpointTP-self-signed-4294967295

inservice

!

webvpninstallsvcdisk0:/webvpn/svc.pkg

!

webvpncontextwebcontext

sslauthenticateverifyall

!

!

policygroupsslvpn-policy

functionssvc-enabled

svcaddress-pool"ssl-add"

svcsplitinclude192.168.20.0255.255.255.0

default-group-policysslvpn-policy

aaaauthenticationlistwebvpn

gatewayvpngatewaydomainsshvpn

inservice

!

!

end

R2#showrunning-config

Buildingconfiguration...

Currentconfiguration:973bytes

!

version12.4

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameR2

!

boot-start-marker

boot-end-marker

!

!

noaaanew-model

!

resourcepolicy

!

ipcef

!

!

!

!

!

!

interfaceLoopback1

ipaddress22.1.1.1255.255.255.0

!

interfaceFastEthernet0/0

ipaddress192.168.20.10255.255.255.0

duplexhalf

!

interfaceSerial1/0

ipaddress10.1.1.2255.255.255.252

serialrestart-delay0

!

interfaceSerial1/1

noipaddress

shutdown

serialrestart-delay0

!

interfaceSerial1/2

noipaddress

shutdown

serialrestart-delay0

!

interfaceSerial1/3

noipaddress

shutdown

serialrestart-delay0

!

routerrip

version2

network10.0.0.0

network22.0.0.0

network192.168.20.0

noauto-summary

!

noiphttpserver

noiphttpsecure-server

!

!

!

loggingalarminformational

!

!

!

!

!

control-plane

!

!

linecon0

exec-timeout00

stopbits1

lineaux0

stopbits1

linevty04

!

!

end

三、客户端配置

在浏览器中输入https://192.168.10.10/访问WebVPN,这时会弹出提示信

息,点击�确定�

需要安装证书,点击�是�,这里第一个感叹号是因为这个证书只路由器自

签发的,没有经过验证,而第二个感叹号是因为配置WebVPN时应该注意证书颁

发后的证书的有效期,往往颁发证书时的有有效期限时间会比当前时间晚一二天

这时会弹出网页,输入用户和密码,点击 login

这时会自动安装 SSLVPNClient软件

需要点击允许安装 ACTIVE控件,会弹出安装界面,点击安装

正在进行 SSLVPNClient

点击安装证书

安装证书之后,这样 VPN连接就建立起来,在屏幕的右下部会显示出黄色

的小钥匙的标志

四、验证配置

在客户端上可以查看 VPN的状态。

可以查看 VPN隧道的分离子网。

使用ipconfig命令可以查看到获得的地址。

查看路由表,可以看到一条指向192.168.20.0的路由条目

SSLVPN是指采用了SSL(Securitysocketlayer)协议基于应用层传输的VPN,

通过HTTPS来访问受保护的应用服务。使用SSLVPN可以解决远程用户访问公

司敏感数据最简单最安全的解决技术。而且与复杂的IPSecVPN相比,SSL通过

简单易用的方法实现信息远程连通。SSLVPN具备很强的灵活性,它不需要象传

统IPSecVPN一样必须为每一台客户机安装客户端软件,SSLVPN内嵌在浏览器

中,如今几乎所有浏览器都内建有SSL功能。

通常SSLVPN分为以下几类:

1、ClientlessSSLVPN

ClientlessSSLVPN可以进行网关地址或者协议的转换以及内容的解析

和重写。支持基于浏览器的应用服务,允许用户访问Web应用程序,OutlookWeb

Access等。例如公司内部启用了http或https的资源,远程用户通过VPN接入

到内部网络后,就可以直接通过浏览器对指定的http或https资源进行访问。

ClientlessSSLVPN还支持CommonInternetFileSystem(CIFS),允许用户

浏览共享文件夹。

2、Thin-ClientSSLVPN(port-forwardingJavaapplet)

使用Thin-ClientSSLVPN时,远程用户必须下载一个基于JAVA的小应

用程序。通过JAVA的小应用程序可以建立端口映射表,使用户可以访问使用静

态端口的TCP应用服务,例如:POP3,SMTP,IMAP,SSH,Telnet等。Thin-Client

SSLVPN不支持基于UDP协议的应用服务。使用Thin-ClientSSLVPN连接服务

器时,用户需要本地计算机的管理员特权,因为对文件的修改是在本地机器中

进行。Thin-ClientSSLVPN不能为使用动态端口的应用服务提供支持,如FTP

服务。

3、 SSLVPNClient(SVC-TunnelMode)

在这种技术中,用户的计算机需要下载Java或者ActiveX程序,一个小

的客户端软件(大概有 500kB)。SSLVPNClient支持所有基于IP流量的应用

程序,允许对公司内部指定的资源进行安全访问。客户端软件可以永久地被下

载到远程工作站,也可以在安全会话结束后就被删除。远程用户使用的SSL隧

道在network(IP)layer移动数据。因此,隧道模式支持大多数基于IP的应

用,支持多种流行的企业应用。

在CiscoIOS路由器的IOS12.4(6)T以及更高版本中,提供了对SSL

VPN的支持,使用CiscoIOS路由器可以轻松的完成SSLVPN的配置。同时CISCO

还提供了名为CISCO安全桌面的SSLVPN特性。使用思科安全桌面时,所有信

息从进程开始就进行加密,而不是在进程结束之后才加密。不仅如此,思科安

全桌面能够在客户端系统上创建加密硬盘分区,然后创建一个与普通桌面独立

的虚拟桌面。所有进程操作都在安全的虚拟桌面环境中进行,所有数据都将写

入加密的硬盘分区中。在进程结束时,历史文件、临时文件、高速缓存、cookie、

电子邮件附件及其它下载数据都将被彻底删除,从而加强了终端的安全保护。

R1基本配置:

HTTPRouter(config)#interfacef0/0

HTTPRouter(config-if)#ipaddress10.0.0.1255.255.255.0

HTTPRouter(config-if)#noshutdown

HTTPRouter(config-if)#exit

HTTPRouter(config)#usernameciscoprivilege15passwordcisco

HTTPRouter(config-line)#linevty015

HTTPRouter(config-line)#loginlocal

HTTPRouter(config-line)#exit

HTTPRouter(config)#iphttpserver

HTTPRouter(config)#iphttpsecure-server

HTTPRouter(config)#iphttpauthenticationlocal

HTTPRouter(config)#iproute0.0.0.00.0.0.010.0.0.2

Webvpn服务器的配置:

Webvpn(config)#webvpngatewayccxx

Webvpn(config-webvpn-gateway)#ipaddress

20.0.0.2

Webvpn(config-webvpn-gateway)#hostname

Cisco_Webvpn

Webvpn(config-webvpn-gateway)#sslencryption3des-sha1aes-sha1

rc4-md5

Webvpn(config-webvpn-gateway)#inservice

Webvpn(config-webvpn-gateway)#exit

启用AAA,并完成线下保护

Webvpn(config)#aaanew-model

Webvpn(config)#aaaauthenticationloginnoaaanone

Webvpn(config)#enablepasswordcisco

Webvpn(config)#lineconsole0

Webvpn(config-line)#logiauthenticationnoaaa

Webvpn(config-line)#exit

Webvpn(config)#aaaauthenticationloginWebvpnlocal

Webvpn(config)#usernameciscoprivilege15passwordcisco

配置SSLVPNContext

Webvpn(config)#webvpncontextWebvpn_context

Webvpn(config-webvpn-context)#aaaauthenticationlistWebvpn

Webvpn(config-webvpn-context)#gatewayccxx

Webvpn(config-webvpn-context)#url-listWebvpn

Webvpn(config-webvpn-url)#headingURL_List

Webvpn(config-webvpn-url)#url-text"R1_HTTP"url-value

http://10.0.0.1

Webvpn(config-webvpn-url)#url-text"R1_HTTPS"url-value

https://10.0.0.1

Webvpn(config-webvpn-context)#policygroupWebvpn

Webvpn(config-webvpn-group)#url-listWebvpn

Webvpn(config-webvpn-group)#exit

Webvpn(config-webvpn-context)#default-group-policyWebvpn

Webvpn(config-webvpn-context)#inservice

Webvpn(config-webvpn-context)#exit

采用Cisco路由器建立VPN实例

2008-12-0415:44

----VPN是企业实现安全远程互联的有效方法。本文根据一个应用实例,具体

描述VPN的 配置和实施过程。其主要应用特点包括:基于封装安全负载标准

ESP-DES(EncapsulatingSecuriryPayload� DataEncryptionStandard)的

IPSec;专有网络通过端口地址转换(PAT)技术访问Internet。

一、 网络基本情况

----该单位公司总部在北京,全国有3个分支机构。要求做到在4个地点的数

据能够实时查询,便于业务员根据具体情况作出正确决策。早期方案是使用路由

器,通过速 率为256Kbps的DDN专网连接北京总部。但技术人员通过市场调研,

发现该网络运营成本过高。通过进一步的咨询和调整,最终方案是分支机构使用

DDN在本地接入Internet,总部使用以太网就近接入Internet。并对互联的路

由器进行配置,使用VPN技术,保证内部数据通过Internet安全传输。该企业

的网络分布见附图。

二、配置过程及测试步骤

----在实施配置前,需要检查硬件和软件是否支持VPN。对于Cisco路由器,

要求IOS版本高于12.0.6(5)T,且带IPSec功能。本配置在Cisco路由器上配

置通过。

----以下是分支网络1的路由器实际配置过程,其他路由器的配置方法与此基

本一致,只需修改具体的环境参数(IP地址和接口名称)即可。

----以下黑体字为输入部分,<Enter>为键盘对应键, Ẑ为Ctrl+Z组合键。

----1.配置路由器的基本参数,并测试网络的连通性

----(1) 进入路由器配置模式

----将计算机串口与路由器console口连接,并按照路由器说明书配置�终端

仿真�程序。执行下述命令进入配置模式。

----Router>en

----Router#configterminal

----Router(config)#

----(2)配置路由器的基本安全参数

----主要是设置特权口令、远程访问口令和路由器名称,方便远程调试。

----Router(config)#enablesecretxxxxxxx

----Router(config)#linevty04

----Router(config-line)#passwordxxxxxx

----Router(config-line)#exit

----Router(config)#hostnamehuadong

----huadong(config)#

----(3)配置路由器的以太网接口,并测试与本地计算机的连通性

----注意:配置前,请将线缆与相关设备连接好。其中ethernet0/0端口接内

部网络,serial0/0端口接外部网络。外部网络接口地址由ISP分配,至少 一

个地址,多者不限。以下假定为一个,使用PAT模式,地址为210.75.32.9,上

级路由器为210.75.32.10。内部网络地址如附图所标 示。

----关键是配置IP地址和启用以太网接口。测试时,使用基本的测试命令ping。

----huadong(config)#intereth0/0

----huadong(config-if)#ipaddress172.17.1.1255.255.255.0

----huadong(config-if)#noshutdown

----以下是测试命令:

----huadong#ping172.17.1.1

----�

----!!!!!

----�

----huadong#ping172.17.1.100

----�

----!!!!!

----�

----在IP地址为172.17.1.100的计算机上:

----c:>ping172.17.1.1

----Pinging172.17.1.1with32bytesofdata:

----Replyfrom172.17.1.1:bytes=32time=5msTTL=255

----��

----结果证明连接及配置正确。

----(4) 配置路由器的串口,并测试与上级路由器的连通性

----与以太网口的配置方法类似,而且需要指定带宽和包的封装形式。同时,

注意将Cisco设备特有的CDP协议关掉,保证基本的安全。

----huadong(config)#interserial0/0

----huadong(config-if)#ipaddress210.75.32.9255.255.255.252

----huadong(config-if)#bandwidth256

----huadong(config-if)#encapsulationppp

----huadong(config-if)#nocdpenable

----huadong(config-if)#noshutdown

----以下是测试命令:

----huadong#ping210.75.32.9

----��

----!!!!!

----��

----huadong#ping210.75.32.10

----��

----!!!!!

----��

----结果证明连接及配置正确。

----2.配置路由器NAT网络

----(1) 配置外出路由并测试

----主要是配置缺省路由。

----huadong(config)#iproute0.0.0.00.0.0.0210.75.32.9

----huadong#ping211.100.15.36

----��

----!!!!!

----��

----结果证明本路由器可以通过ISP访问Internet。

----(2) 配置PAT,使内部网络计算机可以访问外部网络,但不能访问总部

和分支机构

----主要是基于安全目的,不希望内部网络被外部网络所了解,而使用地址转

换(NAT)技术。同时,为了节约费用,只租用一个IP地址(路由器使用)。所

以,需要使用PAT技术。使用NAT技术的关键是指定内外端口和访问控制列表。

----在访问控制列表中,需要将对其他内部网络的访问请求包废弃,保证对其

他内部网络的访问是通过IPSec来实现的。

----huadong(config)#intereth0/0

----huadong(config-if)#ipnatinside

----huadong(config-if)#interserial0/0

----huadong(config-if)#ipnatoutside

----huadong(config-if)#exit

----以上命令的作用是指定内外端口。

----huadong(config)#route-mapabcpermit10

----huadong(config-route-map)#matchipaddress150

----huadong(config-route-map)#exit

----以上命令的作用是指定对外访问的规则名。

----huadong(config)#access-list150deny172.17.1.00.0.0.255

172.16.0.00.0.255.255

----huadong(config)#access-list150deny172.17.1.00.0.0.255

172.17.2.00.0.0.255

----huadong(config)#access-list150deny172.17.1.00.0.0.255

172.17.3.00.0.0.255

----huadong(config)#access-list150permitip172.17.1.00.0.0.255any

----以上命令的作用是指定对外访问的规则内容。例如,禁止利用NAT对其他

内部网络直接访问(当然,专用地址本来也不能在Internet上使用),和允许

内部计算机利用NAT技术访问Internet(与IPSec无关)。

----huadong(config)#ipnatinsidesourceroute-mapabcinterface

serial0/0overload

----上述命令的作用是声明使用串口的注册IP地址,在数据包遵守对外访问的

规则的情况下,使用PAT技术。

----以下是测试命令,通过该命令,可以判断配置是否有根本的错误。例如,

在命令的输出中,说明了内部接口和外部接口。并注意检查输出与实际要求是否

相符。

----huadong#showipnatstat

----Totalactivetranslations:0(0static,0dynamic;0extended)

----Outsideinterfaces:

----Serial0/0

----Insideinterfaces:

----Ethernet0/0

----��

----在IP地址为172.17.1.100的计算机上,执行必要的测试工作,以验证内

部计算机可以通过PAT访问Internet。

----c:>ping210.75.32.10

----��

----Replyfrom210.75.32.10:bytes=32time=1msTTL=255

----��

----c:>pingwww.ninemax.com

----��

----Replyfrom211.100.15.36:bytes=32time=769msTTL=248

----��

----此时,在路由器上,可以通过命令观察PAT的实际运行情况,再次验证PAT

配置正确。

----huadong#showipnattran

----ProInsideglobalInsidelocalOutsidelocalOutsideglobal

----icmp210.75.32.9:1975172.17.1.100:1975210.75.32.10:1975

210.75.12.10:1975

----��

----以上测试过程说明,NAT配置正确。内部计算机可以通过安全的途径访问

Internet。当然,如果业务要求,不允许所有的内部员工/计算机,或只允许部

分内部计算机访问Internet,那么,只需要适当修改上述配置命令,即可实现。

----3.配置ESP-DESIPSec并测试

----以下配置是配置VPN的关键。首先,VPN隧道只能限于内部地址使用。如

果有更多的内部网络,可在此添加相应的命令。

----huadong(config)#access-list105permitip172.17.1.00.0.0.255

172.16.0.00.0.255.255

----huadong(config)#access-list106permitip172.17.1.00.0.0.255

172.17.2.00.0.0.255

----huadong(config)#access-list107permitip172.17.1.00.0.0.255

172.17.3.00.0.0.255

----指定VPN在建立连接时协商IKE使用的策略。方案中使用sha加密算法,

也可以使用md5算法。在IKE协商过程中使用预定义的码字。

----huadong(config)#cryptoisakmppolicy10

----huadong(config-isakmp)#hashsha

----huadong(config-isakmp)#authenticationpre-share

----huadong(config-isakmp)#exit

----针对每个VPN路由器,指定预定义的码字。可以一样,也可以不一样。但

为了简明起见,建议使用一致的码字。

----huadong(config)#cryptoisakmpkeyabc2001address211.157.243.130

----huadong(config)#cryptoisakmpkeyabc2001address202.96.209.165

----huadong(config)#cryptoisakmpkeyabc2001address192.18.97.241

----为每个VPN(到不同的路由器,建立不同的隧道)制定具体的策略,并对

属于本策略的数据包实施保护。本方案包括3个VPN隧道。需要制定3个相应的

入口策略(下面只给出1个)。

----huadong(config)#cryptomapabc20ipsec-isakmp

----huadong(config-crypto-map)#setpeer211.157.243.130

----huadong(config-crypto-map)#settransform-setabc-des

----huadong(config-crypto-map)#matchaddress105

----huadong(config-crypto-map)#exit

----使用路由器的外部接口作为所有VPN入口策略的发起方。与对方的路由器

建立IPSec。

----huadong(config)#cryptomapabclocal-addressserial0

----IPSec使用ESP-DES算法(56位加密),并带SHA验证算法。

----huadong(config)#cryptoipsectransform-setabc-desesp-des

esp-sha-hmac

----指明串口使用上述已经定义的策略。

----huadong(config)#interserial0/0

----huadong(config-if)#cryptomapabc

----在IP地址为172.17.1.100的计算机上验证:

----c:>ping172.16.1.100

----��

----Replyfrom172.16.1.100:bytes=32time=17msTTL=255

----��

----huadong#showcryptoengineconnacti

----IDInterfaceIP-AddressStateAlgorithmEncryptDecrypt

----1<none><none>setHMAC_SHA+DES_56_CB00

----2000Serial0/0210.75.32.9setHMAC_SHA+DES_56_CB0452

----2001Serial0/0210.75.32.9setHMAC_SHA+DES_56_CB6940

----同时,这种连接使用了IPSec,而没有使用NAT技术。

三、测试

----将所有路由器按照上述过程,根据具体的环境参数,做必要修改后,完成

VPN的配置。网络部分任务完成,可以顺利开展业务应用了。

----如果需要,路由器本身提供更详细的调试命令:

----debugcryptoengineconnectionsactive

----debugcryptoisakmpsa

----debugcryptoipsecsa

----在调试时,需要注意,在对应路由器上也执行相应的调试命令。然后,在

一台客户机(172.17.1.100)上执行如下命令:

----c:>ping172.16.1.100-n1

----最后,对比2个路由器的输出,观察出现问题的提示��这是隧道不能建

立的主要原因。针对此提示,做必要的修改工作,便可圆满完成VPN的配置计划。

CISCO路由器VPN实例配置方案-中文注解

Router:sam-i-am(VPNServer)

Currentconfiguration:

!

version12.2

servicetimestampsdebuguptime

servicetimestampsloguptime

noservicepassword-encryption

!

hostnamesam-i-am

!

ipsubnet-zero

!---IKE配置

sam-i-am(config)#cryptoisakmppolicy1//定义策略为1

sam-i-am(isakmp)#hashmd5//定义MD5散列算法

sam-i-am(isakmp)#authenticationpre-share//定义为预共享密钥认

证方式

sam-i-am(config)#cryptoisakmpkeycisco123address0.0.0.0

0.0.0.0

!---配置预共享密钥为cisco123,对等端为所有IP

!---IPSec协议配置

sam-i-am(config)#cryptoipsectransform-setrtpsetesp-des

esp-md5-hmac

!---创建变换集 esp-desesp-md5-hmac

sam-i-am(config)#cryptodynamic-maprtpmap10//创建动态保密图

rtpmap10

san-i-am(crypto-map)#settransform-setrtpset//使用上面的定义

的变换集rtpset

san-i-am(crypto-map)#matchaddress115//援引访问列表确定受保

护的流量

sam-i-am(config)#cryptomaprtptrans10ipsec-isakmpdynamic

rtpmap

!---将动态保密图集加入到正规的图集中

!

interfaceEthernet0

ipaddress10.2.2.3255.255.255.0

noipdirected-broadcast

ipnatinside

fc2破解版手机客户端fc2手机客户端-第1张图片-太平洋在线企业邮局

nomopenabled

!

interfaceSerial0

ipaddress99.99.99.1255.255.255.0

noipdirected-broadcast

ipnatoutside

cryptomaprtptrans//将保密映射应用到S0接口上

!

ipnatinsidesourceroute-mapnonatinterfaceSerial0overload

!---这个NAT配置启用了路由策略,内容为10.2.2.0到10.1.1.0的

访问不进行地址翻译

!---到其他网络的访问都翻译成SO接口的IP地址ipclassless

iproute0.0.0.00.0.0.0Serial0//配置静态路由协议

noiphttpserver

!

access-list115permitip10.2.2.00.0.0.25510.1.1.00.0.0.255

access-list115denyip10.2.2.00.0.0.255any

!

access-list120denyip10.2.2.00.0.0.25510.1.1.00.0.0.255

access-list120permitip10.2.2.00.0.0.255any

!

sam-i-am(config)#route-mapnonatpermit10//使用路由策略

sam-i-am(router-map)#matchipaddress120

!

linecon0

transportinputnone

lineaux0

linevty04

passwordww

login

!

end

Router:dr_whoovie(VPNClient)

Currentconfiguration:

!

version12.2

servicetimestampsdebuguptime

servicetimestampsloguptime

noservicepassword-encryption

!

hostnamedr_whoovie

!

ipsubnet-zero

!

dr_whoovie(config)#cryptoisakmppolicy1//定义策略为1

dr_whoovie(isakmp)#hashmd5//定义MD5散列算法

dr_whoovie(isakmp)#authenticationpre-share//定义为预共享密钥

认证方式

dr_whoovie(config)#cryptoisakmpkeycisco123address99.99.99.1

!---配置预共享密钥为cisco123,对等端为服务器端IP99.99.99.1

!---IPSec协议配置

dr_whoovie(config)#cryptoipsectransform-setrtpsetesp-des

esp-md5-hmac

!---创建变换集 esp-desesp-md5-hmac

dr_whoovie(config)#cryptomaprtp1ipsec-isakmp

!---使用IKE创建保密图rtp1

dr_whoovie(crypto-map)#setpeer99.99.99.1//确定远程对等端

dr_whoovie(crypto-map)#settransform-setrtpset//使用上面的定

义的变换集rtpset

dr_whoovie(crypto-map)#matchaddress115//援引访问列表确定受

保护的流量

!

interfaceEthernet0

ipaddress10.1.1.1255.255.255.0

noipdirected-broadcast

ipnatinside

nomopenabled

!

interfaceSerial0

ipaddressnegotiated//IP地址自动获取

noipdirected-broadcast

ipnatoutside

encapsulationppp//S0接口封装ppp协议

noipmroute-cache

noiproute-cache

cryptomaprtp//将保密映射应用到S0接口上

!

ipnatinsidesourceroute-mapnonatinterfaceSerial0overload

!---这个NAT配置启用了路由策略,内容为10.1.1.0到10.2.2.0的

访问不进行地址翻译

!---到其他网络的访问都翻译成SO接口的IP地址

ipclassless

iproute0.0.0.00.0.0.0Serial0//配置静态路由协议

noiphttpserver

!

access-list115permitip10.1.1.00.0.0.25510.2.2.00.0.0.255

access-list115denyip10.1.1.00.0.0.255any

access-list120denyip10.1.1.00.0.0.25510.2.2.00.0.0.255

access-list120permitip10.1.1.00.0.0.255any

!

dialer-list1protocolippermit

dialer-list1protocolipxpermit

route-mapnonatpermit10//使用路由策略

matchipaddress120

!

linecon0

transportinputnone

lineaux0

linevty04

passwordww

login

!

end

用cisco路由器实现VPN实例配置方案-中文注解

Router:sam-i-am(VPNServer)

Currentconfiguration:

!

version12.2

servicetimestampsdebuguptime

servicetimestampsloguptime

noservicepassword-encryption

!

hostnamesam-i-am

!

ipsubnet-zero

!---IKE配置

sam-i-am(config)#cryptoisakmppolicy1//定义策略为1

sam-i-am(isakmp)#hashmd5//定义MD5散列算法

sam-i-am(isakmp)#authenticationpre-share//定义为预共享密钥认证方式

sam-i-am(config)#cryptoisakmpkeycisco123address0.0.0.00.0.0.0

!---配置预共享密钥为cisco123,对等端为所有IP

!---IPSec协议配置

sam-i-am(config)#cryptoipsectransform-setrtpsetesp-desesp-md5-hmac

!---创建变换集 esp-desesp-md5-hmac

sam-i-am(config)#cryptodynamic-maprtpmap10//创建动态保密图rtpmap10

san-i-am(crypto-map)#settransform-setrtpset//使用上面的定义的变换集

rtpset

san-i-am(crypto-map)#matchaddress115//援引访问列表确定受保护的流量

sam-i-am(config)#cryptomaprtptrans10ipsec-isakmpdynamicrtpmap

!---将动态保密图集加入到正规的图集中

!

interfaceEthernet0

ipaddress10.2.2.3255.255.255.0

noipdirected-broadcast

ipnatinside

nomopenabled

!

interfaceSerial0

ipaddress99.99.99.1255.255.255.0

noipdirected-broadcast

ipnatoutside

cryptomaprtptrans//将保密映射应用到S0接口上

!

ipnatinsidesourceroute-mapnonatinterfaceSerial0overload

!---这个NAT配置启用了路由策略,内容为10.2.2.0到10.1.1.0的访问不进

行地址翻译

!---到其他网络的访问都翻译成SO接口的IP地址

ipclassless

iproute0.0.0.00.0.0.0Serial0//配置静态路由协议

noiphttpserver

!

access-list115permitip10.2.2.00.0.0.25510.1.1.00.0.0.255

access-list115denyip10.2.2.00.0.0.255any

!

access-list120denyip10.2.2.00.0.0.25510.1.1.00.0.0.255

access-list120permitip10.2.2.00.0.0.255any

!

sam-i-am(config)#route-mapnonatpermit10//使用路由策略

sam-i-am(router-map)#matchipaddress120

!

linecon0

transportinputnone

lineaux0

linevty04

passwordww

login

!

end

Router:dr_whoovie(VPNClient)

Currentconfiguration:

!

version12.2

servicetimestampsdebuguptime

servicetimestampsloguptime

noservicepassword-encryption

!

hostnamedr_whoovie

!

ipsubnet-zero

!

dr_whoovie(config)#cryptoisakmppolicy1//定义策略为1

dr_whoovie(isakmp)#hashmd5//定义MD5散列算法

dr_whoovie(isakmp)#authenticationpre-share//定义为预共享密钥认证方式

dr_whoovie(config)#cryptoisakmpkeycisco123address99.99.99.1

!---配置预共享密钥为cisco123,对等端为服务器端IP99.99.99.1

!---IPSec协议配置

dr_whoovie(config)#cryptoipsectransform-setrtpsetesp-des

esp-md5-hmac

!---创建变换集 esp-desesp-md5-hmac

dr_whoovie(config)#cryptomaprtp1ipsec-isakmp

!---使用IKE创建保密图rtp1

dr_whoovie(crypto-map)#setpeer99.99.99.1//确定远程对等端

dr_whoovie(crypto-map)#settransform-setrtpset//使用上面的定义的变换

集rtpset

dr_whoovie(crypto-map)#matchaddress115//援引访问列表确定受保护的流

!

interfaceEthernet0

ipaddress10.1.1.1255.255.255.0

noipdirected-broadcast

ipnatinside

nomopenabled

!

interfaceSerial0

ipaddressnegotiated//IP地址自动获取

noipdirected-broadcast

ipnatoutside

encapsulationppp//S0接口封装ppp协议

noipmroute-cache

noiproute-cache

cryptomaprtp//将保密映射应用到S0接口上

!

ipnatinsidesourceroute-mapnonatinterfaceSerial0overload

!---这个NAT配置启用了路由策略,内容为10.1.1.0到10.2.2.0的访问不进

行地址翻译

!---到其他网络的访问都翻译成SO接口的IP地址

ipclassless

iproute0.0.0.00.0.0.0Serial0//配置静态路由协议

noiphttpserver

!

access-list115permitip10.1.1.00.0.0.25510.2.2.00.0.0.255

access-list115denyip10.1.1.00.0.0.255any

access-list120denyip10.1.1.00.0.0.25510.2.2.00.0.0.255

access-list120permitip10.1.1.00.0.0.255any

!

dialer-list1protocolippermit

dialer-list1protocolipxpermit

route-mapnonatpermit10//使用路由策略

matchipaddress120

!

linecon0

transportinputnone

lineaux0

linevty04

passwordww

login

!

end

-----------IKE配置----------------

IPSecVPN对等端为了建立信任关系,必须交换某种形式的认证密钥。

Internet密钥交换(InternetKeyExchange,IKE)是一种为IPSec管理和交换

密钥的标准方法。

一旦两个对等端之间的IKE协商取得成功,那么IKE就创建到远程对等端的安全

关联(securityassociation,SA)。SA是单向的;在两个对等端之间存在两

个SA。

IKE使用UDP端口500进行协商,确保端口500不被阻塞。

配置

1、(可选)启用或者禁用IKE

(global)cryptoisakmpenable

或者

(global)nocryptoisakmpenable

默认在所有接口上启动IKE

2、创建IKE策略

(1)定义策略

(global)cryptoisakmppolicypriority

注释:policy1表示策略1,假如想多配几个VPN,可以写成policy2、policy3┅

(2)(可选)定义加密算法

(isakmp)encryption{des|3des}

加密模式可以为56位的DES-CBC(des,默认值)或者168位的3DES(3des)

(3)(可选)定义散列算法

(isamkp)hash{sha|md5}

默认sha

(4)(可选)定义认证方式

(isamkp)authentication{rsa-sig|rsa-encr|pre-share}

rsa-sig要求使用CA并且提供防止抵赖功能;默认值

rsa-encr不需要CA,提供防止抵赖功能

pre-share通过手工配置预共享密钥

(5)(可选)定义Diffie-Hellman标识符

(isakmp)group{1|2}

注释:除非购买高端路由器,或是VPN通信比较少,否则最好使用group1长度

的密钥,group命令有两个参数值:1和2。参数值1表示密钥使用768位密钥,

参数值2表示密钥使用1024位密钥,显然后一种密钥安全性高,但消耗更多的

CPU时间。

(6)(可选)定义安全关联的生命期

(isakmp)lifetimeseconds

注释:对生成新SA的周期进行调整。这个值以秒为单位,默认值为86400,也

就是一天。值得注意的是两端的路由器都要设置相同的SA周期,否则VPN在正

常初始化之后,将会在较短的一个SA周期到达中断。

3、(rsa-sig)使用证书授权(CA)

(1)确保路由器有主机名和域名

(global)hostnamehostname

(global)ipdomain-namedomain

(2)产生RSA密钥

(global)cryptokeygeneratersa

(3)使用向IPSec对等端发布证书的CA

--设定CA的主机名

(global)cryptocaidentityname

--设定联络CA所使用的URL

(ca-identity)enrollmenturlurl

URL应该采用http://ca-domain-nameort/cgi-bin-location的形式

--(可选)使用RA模式

(ca-identity)enrollmentmodera

(ca-identity)queryurlurl

--(可选)设定注册重试参数

(ca-identity)enrollmentretryperiodminutes

(ca-identity)enrollmentretrycountnumber

minutes(1到60;默认为1)number(1到100;默认为0,代表无穷次)

--(可选)可选的证书作废列表

(ca-identity)crloptional

(4)(可选)使用可信的根CA

--确定可信的根CA

(global)cryptocatrusted-rootname

--(可选)从可信的根请求CRL

(ca-root)crlqueryurl

--定义注册的方法

(ca-root)root{CEPurl|TFTPserverfile|PROXYurl}

fc2破解版手机客户端fc2手机客户端-第2张图片-太平洋在线企业邮局

(5)认证CA

(global)cryptocaauthenticatename

(6)用CA注册路由器

(global)cryptocaenrollname

4、(rsa-encr)手工配置RSA密钥(不使用CA)

(1)产生RSA密钥

(global)cryptokeygeneratersa

(2)指定对等端的ISAKMP标识

(global)cryptoisakmpidentity{address|hostname}

(3)指定其他所有对等端的RSA密钥

--配置公共密钥链

(global)cryptokeypubkey-chainrsa

--用名字或地址确定密钥

(pubkey-chain)named-keykey-name[encryption|signature]

(pubkey-chain)addressed-keykey-name[encryption|signature]

--(可选)手工配置远程对等端的IP地址

(pubkey-key)addressip-addr

--指定远程对等端的公开密钥

(pubkey-key)key-stringkey-string

5、(preshare)配置预共享密钥

(global)cryptoisakmpkeykey-string{addrss|hostname}{peer-address

|peer-hostname}

注释:返回到全局设置模式确定要使用的预先共享密钥和指归VPN另一端路由器

IP地址,即目的路由器IP地址。相应地在另一端路由器配置也和以上命令类

6、(可选)使用IKE模式

(1)定义要分发的�内部�或者受保护IP地址库

(global)iplocalpoolpool-namestart-addressend-address

(2)启动IKE模式协商

(global)cryptoisakmpclientconfigurationaddress-poollocalpool-name

--------------IPSec配置----------------

IPSec使用加密、数据完整性、源发鉴别以及拒绝重演分组来保护和认证网络层

对等端之间的IP分组

IPSec对于构建内因网、外因网以及远程用户接入VPN来说非常有用处

IPSec支持以下标准

--Internet协议的安全体系结构

--IKE(Internet密钥交换)

--DES(数据加密标准)

--MD5

--SHA

--AH(AuthenticationHeader,认证首部)数据认证和反重演(anti-reply)服务

--ESP(EncapsulationSecurityPayload,封装安全净荷)数据隐私、数据验证

以及反重演(anti-reply)服务

敏感流量由访问列表所定义,并且通过cryptomap(保密图)集被应用到接口上。

配置

1、为密钥管理配置IKE

2、(可选)定义SA的全局生命期

(global)cryptoipsecsecurity-associationlifetimesecondsseconds

(global)cryptoipsecsecurity-associationlifetimekillobyteskilobytes

3、定义保密访问列表来定义受保护的流量

(global)access-listaccess-list-number....

或者

(global)ipaccess-listextendedname

扩展的访问列表必须定义由IPSec保护哪种IP流量。保密图(cryptomap)援引

这个访问列表来确定在接口上要保护的流量。

4、定义IPSec交换集

(1)创建变换集

(global)cryptoipsectransform-setname[transform1|transform2|

transform3]

可以在一个保密图(cryptomap)中定义多个变换集。如果没有使用IKE,那么只

能定义一种变换集。用户能够选择多达三种变换。

(可选)选择一种AH变换

--ah-md5-hmac

--ah-sha-hmac

--ah-rfc-1828

(可选)选择一种ESP加密编号

--esp-des

--esp-3des

--esp-rfc-1829

--esp-null

以及这些验证方法之一

--esp-md5-hmac

--esp-sha-hmac

(可选)选择IP压缩变换

--comp-lzs

(2)(可选)选择变换集的模式

(crypto-transform)mode{tunnel|transport}

5、使用IPSec策略定义保密映射

保密图(cryptomap)连接了保密访问列表,确定了远程对等端、本地地址、变换

集和协商方法。

(1)(可选)使用手工的安全关联(没有IKE协商)

--创建保密图

(global)cryptomapmap-namesequenceipsec-manual

--援引保密访问列表来确定受保护的流量

(crypto-map)matchaddressaccess-list

--确定远程的IPSec对等端

(crypto-map)setpeer{hostname|ip_addr}

--指定要使用的变换集

(crypto-map)settransform-setname

变换集必须和远程对等端上使用的相同

--(仅适用于AH验证)手工设定AH密钥

(crypto-map)setsession-keyinboundahspihex-key-data

(crypto-map)setsession-keyoutboundahspihex-key-data

--(仅适用于ESP验证)手工设定ESPSPI和密钥

(crypto-map)setsession-keyinboundahspihex-key-data[authenticator

hex-key-data]

(crypto-map)setsession-keyoutboundahspihex-key-data[authenticator

hex-key-data]

(2)(可选)使用IKE建立的安全关联

--创建保密图

(global)cryptomapmap-namesequenceipsec-isakmp

--援引保密访问列表来确定受保护的流量

(crypto-map)matchaddressaccess-list

--确定远程的IPSec对等端

(crypto-map)setpeer{hostname|ip_addr}

--指定要使用的变换集

(crypto-map)settransform-setname

变换集必须和远程对等端上使用的相同

--(可选)如果SA生命期和全局默认不同,那么定义它:

(crypto-map)setsecurity-associationlifetimesecondsseconds

(crypto-map)setsecurity-associationlifetimekilobyteskilobytes

--(可选)为每个源/目的主机对使用一个独立的SA

(crypto-map)setsecurity-associationlevelper-host

--(可选)对每个新的SA使用完整转发安全性

(crypto-map)setpfs[group1|group2]

(3)(可选)使用动态安全关联

--创建动态的保密图

(global)cryptodynamic-mapdyn-map-namedyn-seq-num

--(可选)援引保密访问列表确定受保护的流量

(crypto-map)matchaddressaccess-list

--(可选)确定远程的IPSec对等端

(crypto-map)setpeer{hostname|ip_addr}

--(可选)指定要使用的变换集

(crypto-map)settransform-settranform-set-name

--(可选)如果SA生命期和全局默认不同,那么定义它:

(crypto-map)setsecurity-associationlifetimesecondsseconds

(crypto-map)setsecurity-associationlifetimekilobyteskilobytes

--(可选)对每个新的SA使用完整转发安全性

(crypto-map)setpfs[group1|group2]

--将动态保密图集加入到正规的图集中

(global)cryptomapmap-namesequenceipsec-isakmpdynamicdyn-map-name

[discover]

--(可选)使用IKE模式的客户机配置

(global)cryptomapmap-nameclientconfigurationaddress[initiate|

respond]

--(可选)使用来自AAA服务器的预共享IKE密钥

(global)cryptomapmap-nameisakmpauthorizationlistlist-name

6、将保密映射应用到接口上

(1)指定要使用的保密映射

(interface)cryptomapmap-name

(2)(可选)和其他接口共享保密映射

(global)cryptomapmap-namelocal-addressinterface-id

示意图:

LNS局域网网关为 192.168.101.1/24;LNS外网口地址为 122.200.

67.180/24

LAC/PC为Win2k/XP的主机,拨号连接,IP地址不固定

建立的PPTP隧道在10.1.1.0/24网段

配置过程:

先用TELNET进入路由器

LNS_Config:

ip local pool pool10 10.1.1.20 50//

username levinboy@qq.com password 0 123456//

interface Virtual-template1//

ip address 10.1.1.1 255.255.255.0//

ppp authentication chap //

ppp chap hostname levinboy@qq.com //

peer default ip address pool pool10 //

vpdn enable//

vpdn-group 10//

accept-dialin//

port Virtual-template1 //

protocol pptp //

local-name dlink//

write

基于 PPTP的 CiscoVPN配置实验实验环境为:Windows XP 和 Cisco 3825路由器

在路由器上做 VPN服务器,用Windows自带的 VPN Client与 VPN服务器连接。

实验拓扑图大致如下:

实验步骤:

一、VPN服务端的配置:

1:、在路由器上启用 VPDN网络(虚拟专用拨号网络) 。这是用于 VPN客户端连接。

2、创建一个基于 PPTP的 VPDN网络组配置,配置如下:

3、将路由器接口配置如下 IP地址。

4、

ip unnumbered gi0/1创建虚拟模板并将其引用到 gi0/1端口上,确保可以接受 VPN的访问

连接。

peer default ip address pool defaultpool 配置默认地址池名称

ppp encrypt mppe auto required 设置 ppp加密方式为微软点对点自动加密。

ppp authentication ms-chap ms-chap-v2配置的 PPP认证机制,以匹配 VPN客户端的默

认值:

5、建立 IP地址池并新建测试用户,

6、配置身份验证 PPP和使用本地数据库。如果你有一个 RADIUS服务器,这在这里您将指向

RADIUS服务器,而不是本地数据库,

到这里,VPN客户端的所有配置已经完成了。再来看一下完整的配置:

ro#show running-config

Building configuration...

Current configuration : 1298 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname tro

!

boot-start-marker

boot-end-marker

!

!

aaa new-model

!

!

aaa authentication ppp default local

!

!

aaa session-id common

ip cef

!

no ip domain lookup

!

multilink bundle-name authenticated

!

vpdn enable

!

vpdn-group linuxtro

! Default PPTP VPDN group

accept-dialin

protocol pptp

virtual-template 1

l2tp tunnel receive-window 1024

!

voice-card 0

no dspfarm

!

username linuxtro password 0 linuxtro

archive

log config

hidekeys

!

interface GigabitEthernet0/0

ip address 192.168.1.10 255.255.255.0

duplex auto

speed auto

media-type rj45

!

interface GigabitEthernet0/1

ip address 10.123.123.123 255.255.255.0

duplex auto

speed auto

media-type rj45

!

interface Virtual-Template1

ip unnumbered GigabitEthernet0/1

peer default ip address pool defaultpool

ppp encrypt mppe auto required

ppp authentication ms-chap ms-chap-v2

!

!

ip local pool defaultpool 10.123.123.10 10.123.123.100

!

!

ip http server

no ip http secure-server

!

!

control-plane

!

line con 0

stopbits 1

line aux 0

stopbits 1

line vty 0 4

!

scheduler allocate 20000 1000

!

webvpn cef

!

End

二、VPN客户端的配置

查看 VPN的属性的安全选项卡下的高级设置按钮可以看到

在这里可以看到Windows下默认的 VPN认证方式是 MS-CHAP MS-CHAP v2

在此处可以看到 VPN类型为 PPTP

在命令行查看 IP地址可以看到已经会的地址池中的 IP地址

基于 L2TP的 CiscoVPN配置实验昨天做的是基于 PPTP的 VPN实验,今天要做的是基于 L2TP的 VPN实验。其实这两个实验环

境是相同的,只是服务器端和客户端的配置稍有不同而已。

实验环境为:Windows XP 和 Cisco 3825路由器

在路由器上做 VPN服务器,用Windows自带的 VPN Client与 VPN服务器连接。

实验拓扑图大致如下:

实验步骤:

一、VPN服务端的配置:

1、 在企业端配置 L2TP准备工作。设置 LNS路由器的接口 IP地址

1:、设置 VPN登录时的用户名和密码信息,

在路由器上启用 L2TP网络(虚拟专用拨号网络)以便 VPN客户端连接。

2、创建一个基于 L2TP的 VPDN网络组配置,配置如下:

3、ip unnumbered gi0/1创建虚拟模板并将其引用到 gi0/1端口上,确保可以接受 VPN的

访问连接。

peer default ip address pool l2tp-user 配置默认地址池名称

ppp authentication chap配置的 PPP认证机制。

5、建立 IP地址池,

到这里,VPN客户端的所有配置已经完成了。再来看一下车完整的配置:

tro#show running-config

Building configuration...

Current configuration : 1255 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname tro

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

ip cef

no ip domain lookup

!

multilink bundle-name authenticated

!

vpdn enable

!

vpdn-group 1

! Default L2TP VPDN group

accept-dialin

protocol l2tp

virtual-template 1

no l2tp tunnel authentication

l2tp tunnel receive-window 1024

!

voice-card 0

no dspfarm

!

username linuxtro password 0 linuxtro

archive

log config

hidekeys

!

interface GigabitEthernet0/0

ip address 192.168.1.10 255.255.255.0

duplex auto

speed auto

media-type rj45

!

interface GigabitEthernet0/1

ip address 10.123.123.99 255.255.255.0

duplex auto

speed auto

media-type rj45

!

interface Virtual-Template1

ip unnumbered GigabitEthernet0/0

peer default ip address pool l2tp-user

ppp authentication chap

!

!

ip local pool l2tp-user 10.123.123.100 10.123.123.200

ip route 0.0.0.0 0.0.0.0 10.123.123.100

!

ip http server

no ip http secure-server

!

control-plane

!

line con 0

stopbits 1

line aux 0

stopbits 1

line vty 0 4

login

!

scheduler allocate 20000 1000

!

webvpn cef

!

end

二、VPN客户端的配置

Windows2000/xp/2003的 L2TP缺省启动证书方式的 IPSEC,因此必须向Windows添加

ProhibitIpSec 注册表值,以防止创建用于 L2TP/IPSec 通信的自动筛选器。

ProhibitIpSec 注册表值设置为 1 时,基于 Windows XP的计算机不会创建使用 CA 身份

验证的自动筛选器,而是检查本地 IPSec 策略或 Active Directory IPSec 策略。

要向Windows添加 ProhibitIpSec 注册表值,请按照下列步骤操作:

1. 单击"开始",单击"运行",键入 regedit,然后单击"确定"。

2. 找到下面的注册表子项,然后单击它:

HKEY_LOCAL_MACHINESystemCurrentControlSetServicesRasmanParameters

3、在该项中新建一个"DWORD值"。 将该值名称修改为"ProhibitIpSec"。 双击该值,将 V

alue data修改为"1", 然后单击"确定"。

6. 退出注册表编辑器,然后重新启动计算机。

7、1. 配置 L2TP 拨号连接:

1) 进入Windows XP 的"开始" "设置" "控制面板",选择"切换到分类视图"。

2) 选择"网络和 Internet 连接"。

3) 选择"创建一个新的连接"。

4) 选择"连接到我的工作场所的网络",单击"下一步"。

5) 为连接输入一个名字为"linuxtro",单击"下一步"。

6) 选择"不拨此初始连接",单击"下一步"。

7) 输入准备连接的 L2TP 服务器的 IP 地址"192.168.1.10",单击"下一步"。

8) 单击"完成"。

9) 双击"linuxtro"连接,在 l2tp 连接窗口,单击"属性"。

10) 选择"安全"属性页,选择"高级(自定义设置)",单击"设置"。

11) 在"数据加密"中选择"可选加密(没有加密也可以连接)", 在"允许这些协议"选中"不加

密的密码(PAP)"、"质询握手身份验证协议(CHAP)"、"Microsoft CHAP(MS-CHAP)",

单击"确定"。

12) 选择"网络"属性页面,在"VPN 类型"选择"L2TP IPSec VPN"。

13) 单击"确定",保存所做的修改。在连接窗口输入用户名和密码。

在命令行查看 IP地址可以看到已经会的地址池中的 IP地址

基于 IPSec的 VPN配置实验

一、搭建实验环境:

DynamipsGUI、SecureCRT、unzip-c3640-ik9o3s-mz.124-10.bin的 CiscoIOS镜像文

R1模拟分部路由器,R2模拟 Internet, R3模拟总部路由器。

并且在 R1及 R3上使用回环接口模拟各自内部局域网主机

具体 IP地址及路由如下:

R1: fa0/0:10.1.1.1/30

Loopback1:172.16.0.1/24

R2: fa/0: 10.1.1.2/30

fa0/1:20.2.2.2/30

R3: fa0/1:20.2.2.1/30

Loopback1:192.168.0.3/24

1、打开小凡 DynamipsGUI设置界面,设置路由器个数为 3个,设备类型为 3640,根据类型

选择 unzip-c3640-ik9o3s-mz.124-10.bin的 CiscoIOS镜像文件,接着就是计算 idle的值

了,点击"计算 idle",确定。在弹出的命令提示行下按任意键启动路由器,然后按"Ctrl+]+i"

来计算 idle的值。

由于 idle值的计算是根据计算机的硬件来得出结果,为了避免误差,降低内存利用率,建议多

计算几次,取出出现次数最多的数值。将得出的 idle值填入 idle-pc中,设置输出目录到指定

位置,点击"下一步"。

2、选择 3个路由器的端口模块,然后点击下一步。

3、连接各个路由器的端口,Router1的 fa0/0与 Router2的 fa0/0相连,Router2的 fa0/

1与 Router3的 fa0/1相连,并使他们生成.Bat文件,然后退出,OKfc2破解版手机客户端!3个模拟路由器已经

建立成功,接下来就是用 SecrueCRT来连接这 3个路由器了。

4、当然,首先是要启动者三个路由器啦,

5、打开 SecureCRT的主界面,使用 Telnet来连接这三台路由器。具体参数设置为使用 Teln

et协议,主机名设为 127.0.0.1,Router1的端口为 2001,Router2的端口为 2002,Rout

er3的端口为 2003。这写端口号是 Console端口,可以在选择 3个路由器的端口模块时看到

这三个端口。

三个路由器启动之后,通过 SecureCRT连接并修改 hostname为 R1、R2、R3。

二、VPN实验配置:

1、

R1路由器的基本配置:

添加默认路由为 10.1.1.2

R2路由器的基本配置:

R3路由器的基本配置:

添加默认路由为 20.2.2.2

2、在 R1上可以 ping通 R3的 fa0/1端口,但是 ping不通 loopback 1端口。在 R3上也是

类似情况。

3、在 R1上配置 IKE

crypto isakmp enable //开启 isakmp;

crypto isakmp policy 10 //配置优先级为 10的 IKE策略。(策略编号 1-1000,号越小,

优先级越高。假如想多配几个 VPN,可以写成 policy 2、policy3……);

encryption aes //指定加密算法为 aes

hash md5 // 指定散列算法为md5

authentication pre-share //指定验证为预共享

group 2 //指定交换密钥 D-H算法密钥强度为 group 2

4、配置对等体的预共享密钥为 linuxtro

5、配置 Ipsec变换集

crypto ipsec transform-set r1_to_r3 esp-aes //创建一个 r1_to_r3的变换集,指定变

换为 esp-aes。 Esp-aes主要来提供加密。但也可以提供认证和完整性。

mode transport //指定 ipsec的传输模式为 transport

6、配置加密访问列表

7、配置加密映射表

Set peer 20.2.2.1 //指定对等体的地址

Set tran r1_to_r3 //指定交换集

Match addre 100 //指定加密访问列表

8、将加密映射表应用到 fa0/0接口上

到此为止,R1的配置就完成了,R3的配置与此类似,不同之处如下:

通过 Ipsec加密数据时,对等体的 IP地址为 10.1.1.1

配置 Ipsec交换集时,创建交换集名称为 r3_to_r1

配置加密访问列表时,源地址和目标地址不同

R3的具体配置如下:

R3#show running-config

Building configuration...

Current configuration : 1661 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R3

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

no ip domain lookup

!

!

crypto isakmp policy 10

encr aes

hash md5

authentication pre-share

group 2

crypto isakmp key linuxtro address 10.1.1.1

!

crypto ipsec transform-set r3_to_r1 esp-aes

mode transport

!

crypto map R3 100 ipsec-isakmp

set peer 10.1.1.1

set transform-set r3_to_r1

match address 100

interface Loopback1

ip address 192.168.0.3 255.255.255.0

!

interface FastEthernet0/0

!

Interface FastEthernet0/1

no switchport

ip address 20.2.2.1 255.255.255.252

crypto map R3

ip route 0.0.0.0 0.0.0.0 20.2.2.2

!

!

access-list 100 permit ip 192.168.0.0 0.0.0.255 172.16.0.0 0.0.0.255

!

control-plane

line con 0

line aux 0

line vty 0 4

!

!

End

三、VPN实验验证

先在 R1上通过 loopback 1端口来 pingR3的 loopback1端口,结果显示是可以 ping通的,

说明 VPN建立成功。

查看 IKE阶段的安全关联性是否成功。出现 QM_IDLE字样说明是成功的。

查看 ipsec关联性,出现以下详细的内容证明 IPSEC 安全关联建立成功。

再到 R3上测试一下:可以看到实验结果也是正确的。

标签: fc2破解版手机客户端

抱歉,评论功能暂时关闭!