--MD5 --SHA
--AH(Authentication Header,认证首部)数据认证和反重演(anti-reply)服务
--ESP(Encapsulation Security Payload,封装安全净荷)数据隐私、数据验证以及反重演
(anti-reply)服务敏感流量由访问列表所定义,并且通过crypto map(保密图)集被应用到接口上。配置:
1、为密钥管理配置IKE 2、(可选)定义SA的全局生命期
(global)crypto ipsec security-association lifetime seconds seconds (global)crypto ipsec security-association lifetime killobytes kilobytes 3、定义保密访问列表来定义受保护的流量
(global)access-list access-list-number ....或者(global)ip access-list extended name,扩展的访问列表必须定义由IPSec保护哪种IP流量。保密图(crypto map)援引这个访问列表来确定在接口上要保护的流量。 4、定义IPSec交换集
(1)创建变换集:(global)crypto ipsec transform-set name [transform1 | transform2 | transform3] 可以在一个保密图(crypto map)中定义多个变换集。如果没有使用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策略定义保密映射
保密图(crypto map)连接了保密访问列表,确定了远程对等端、本地地址、变换集和协商方法。
(1)(可选)使用手工的安全关联(没有IKE协商)
--创建保密图:(global)crypto map map-name sequence ipsec-manual
--援引保密访问列表来确定受保护的流量:(crypto-map)match address access-list --确定远程的IPSec对等端:(crypto-map)set peer {hostname | ip_addr} --指定要使用的变换集:(crypto-map)set transform-set name,变换集必须和远程对等端上使用的相同
--(仅适用于AH验证)手工设定AH密钥:(crypto-map)set session-key inbound ah spi hex-key-data,(crypto-map)set session-key outbound ah spi hex-key-data
--(仅适用于ESP验证)手工设定ESP SPI和密钥
(crypto-map)set session-key inbound ah spi hex-key-data [authenticator hex-key-data] (crypto-map)set session-key outbound ah spi hex-key-data [authenticator hex-key-data] (2)(可选)使用IKE建立的安全关联
--创建保密图:(global)crypto map map-name sequence ipsec-isakmp
--援引保密访问列表来确定受保护的流量:(crypto-map)match address access-list --确定远程的IPSec对等端:(crypto-map)set peer {hostname | ip_addr} --指定要使用的变换集:(crypto-map)set transform-set name,变换集必须和远程对等端上使用的相同。
--(可选)如果SA生命期和全局默认不同,那么定义它: (crypto-map)set security-association lifetime seconds seconds (crypto-map)set security-association lifetime kilobytes kilobytes --(可选)为每个源/目的主机对使用一个独立的SA:(crypto-map)set security-association level per-host
--(可选)对每个新的SA使用完整转发安全性:(crypto-map)set pfs [group1 | group2] (3)(可选)使用动态安全关联
--创建动态的保密图:(global)crypto dynamic-map dyn-map-name dyn-seq-num
--(可选)援引保密访问列表确定受保护的流量:(crypto-map)match address access-list --(可选)确定远程的IPSec对等端:(crypto-map)set peer {hostname | ip_addr} --(可选)指定要使用的变换集:(crypto-map)set transform-set tranform-set-name --(可选)如果SA生命期和全局默认不同,那么定义它: (crypto-map)set security-association lifetime seconds seconds (crypto-map)set security-association lifetime kilobytes kilobytes
--(可选)对每个新的SA使用完整转发安全性:(crypto-map)set pfs [group1 | group2] --将动态保密图集加入到正规的图集中
(global)crypto map map-name sequence ipsec-isakmp dynamic dyn-map-name [discover] --(可选)使用IKE模式的客户机配置
(global)crypto map map-name client configuration address [initiate | respond] --(可选)使用来自AAA服务器的预共享IKE密钥
(global)crypto map map-name isakmp authorization list list-name 6、将保密映射应用到接口上
(1)指定要使用的保密映射:(interface)crypto map map-name
(2)(可选)和其他接口共享保密映射:(global)crypto map map-name local-address interface-id
IPSec&SSL
SSL VPN网关作为一种新兴的VPN技术,与传统的IPSec VPN技术各具特色,各有千秋。SSL VPN比较适合用于移动用户的远程接入(Client-Site),而IPSec VPN则在网对网(Site-Site)的VPN连接中具备先天优势。这两种产品将在VPN市场上长期共存,优势互补。在产品的表现形式上,两者有以下几大差异:
1、 IPsec VPN多用于“网—网”连接,SSL VPN用于”移动客户—网”连接。SSL VPN的移动用户使用标准的浏览器,无需安装客户端程序,即可通过SSL VPN隧道接入内部网络;而IPSec VPN的移动用户需要安装专门的IPSec客户端软件。
2、SSL VPN是基于应用层的VPN,而IPsec VPN是基于网络层的VPN。IPsec VPN对所有的IP应用均透明;而SSL VPN保护基于Web的应用更有优势,当然好的产品也支持TCP/UDP的C/S应用,例如文件共享、网络邻居、Ftp、Telnet、Oracle等。
3、SSL VPN用户不受上网方式限制,SSL VPN隧道可以穿透Firewall;而IPSec客户端需要支持“NAT穿透”功能才能穿透Firewall,而且需要Firewall打开UDP500端口。 4、SSL VPN只需要维护中心节点的网关设备,客户端免维护,降低了部署和支持费用。而IPSec VPN需要管理通讯的每个节点,网管专业性较强。
5、SSL VPN 更容易提供细粒度访问控制,可以对用户的权限、资源、服务、文件进行更加细致的控制,与第三方认证系统(如:radius、AD等)结合更加便捷。而IPSec VPN主要基于IP五元组对用户进行访问控制。
正是出于SSL VPN的这些独特优势,SSL VPN越来越被一些客户所接受。作为业界领先的VPN设备制造商上海安达通信息安全技术有限公司,在原有IPSec VPN SGW25系列安全网关的基础上新近推出了SJW74SSL VPN系列网关,就是要为用户提供更加多样的选择和全方位的VPN互联解决方案。
SJW74SSL VPN网关的2种典型部署方式如下:
SJW74SSL VPN的典型部署模式1:网关模式。该模式所有来自因特网的应用数据都需要通过SJW74SSL VPN的保护才能够进入企业内部网络,以此来阻止消息窃听、消息重放、不合法登录等攻击。VPN网关通常以“透明方式”接入网络。
SJW74SSL VPN的典型部署模式2:代理服务器模式。该模式较模式1安全性更高,因为通过SSL VPN隧道接入的客户能够在VPN上解密后,再通过Firewall的过滤后才能接入到内网中,所以Firewall的效用能够得到更充分的发挥。
VPN实例配置方案
Current configuration: !
version 12.2
service timestamps debug uptime service timestamps log up time no service password-encryption !
hostname sam-i-am !--- IKE配置
sam-i-am(config)#crypto isakmp policy 1 //定义策略为1 sam-i-am(isakmp)#hash md5 //定义MD5散列算法
sam-i-am(isakmp)#authentication pre-share //定义为预共享密钥认证方式 sam-i-am(config)#crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0 !--- 配置预共享密钥为cisco123,对等端为所有IP !--- IPSec协议配置
sam-i-am(config)#crypto ipsec transform-set rtpset esp-des esp-md5-hmac !--- 创建变换集 esp-des esp-md5-hmac
sam-i-am(config)#crypto dynamic-map rtpmap 10 //创建动态保密图rtpmap 10 san-i-am(crypto-map)#set transform-set rtpset //使用上面的定义的变换集rtpset san-i-am(crypto-map)#match address 115 //援引访问列表确定受保护的流量 sam-i-am(config)#crypto map rtptrans 10 ipsec-isakmp dynamic rtpmap !--- 将动态保密图集加入到正规的图集中
!
interface Ethernet0
ip address 10.2.2.3 255.255.255.0 no ip directed-broadcast ip nat inside no mop enabled !
interface Serial0
ip address 99.99.99.1 255.255.255.0 no ip directed-broadcast ip nat outside
crypto map rtptrans //将保密映射应用到S0接口上 !
ip nat inside source route-map nonat interface Serial0 overload
!--- 这个NAT配置启用了路由策略,内容为10.2.2.0到10.1.1.0的访问不进行地址翻译 !--- 到其他网络的访问都翻译成SO接口的IP地址 ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 //配置静态路由协议 no ip http server !
access-list 115 permit ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255 access-list 115 deny ip 10.2.2.0 0.0.0.255 any !
access-list 120 deny ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255 access-list 120 permit ip 10.2.2.0 0.0.0.255 any !
sam-i-am(config)#route-map nonat permit 10 //使用路由策略 sam-i-am(router-map)#match ip address 120 !
line con 0
transport input none line aux 0 line vty 0 4 password ww login ! end
Router:dr_whoovie(VPN Client) Current configuration: !
version 12.2
service timestamps debug uptime service timestamps log uptime
no service password-encryption !
hostname dr_whoovie !
ip subnet-zero !
dr_whoovie(config)#crypto isakmp policy 1 //定义策略为1 dr_whoovie(isakmp)#hash md5 //定义MD5散列算法
dr_whoovie(isakmp)#authentication pre-share //定义为预共享密钥认证方式 dr_whoovie(config)#crypto isakmp key cisco123 address 99.99.99.1 !--- 配置预共享密钥为cisco123,对等端为服务器端IP99.99.99.1 !--- IPSec协议配置
dr_whoovie(config)#crypto ipsec transform-set rtpset esp-des esp-md5-hmac !--- 创建变换集 esp-des esp-md5-hmac
dr_whoovie(config)#crypto map rtp 1 ipsec-isakmp !--- 使用IKE创建保密图rtp 1
dr_whoovie(crypto-map)#set peer 99.99.99.1 //确定远程对等端
dr_whoovie(crypto-map)#set transform-set rtpset //使用上面的定义的变换集rtpset dr_whoovie(crypto-map)#match address 115 //援引访问列表确定受保护的流量 !
interface Ethernet0
ip address 10.1.1.1 255.255.255.0 no ip directed-broadcast ip nat inside no mop enabled !
interface Serial0
ip address negotiated //IP地址自动获取 no ip directed-broadcast ip nat outside
encapsulation ppp //S0接口封装ppp协议 no ip mroute-cache no ip route-cache
crypto map rtp //将保密映射应用到S0接口上 !
ip nat inside source route-map nonat interface Serial0 overload
!--- 这个NAT配置启用了路由策略,内容为10.1.1.0到10.2.2.0的访问不进行地址翻译 !--- 到其他网络的访问都翻译成SO接口的IP地址 ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 //配置静态路由协议 no ip http server !
access-list 115 permit ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255 access-list 115 deny ip 10.1.1.0 0.0.0.255 any