Chinaunix首页 | 论坛 | 博客
  • 博客访问: 422041
  • 博文数量: 61
  • 博客积分: 2286
  • 博客等级: 大尉
  • 技术积分: 550
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-27 22:04
文章分类

全部博文(61)

文章存档

2018年(2)

2017年(1)

2013年(2)

2012年(8)

2011年(6)

2010年(8)

2009年(13)

2008年(21)

我的朋友

分类: 系统运维

2009-12-25 22:21:07

Advanced Encryption Standard (AES):高级加密标准,使用128,192,256位长的KEY来加密128,192,256位长的数据块,可以作出9种组合

Authentication Header (AH): 验证头部,一种安全协议,只是用来验证头部和防重发.不对实际用户数据部分加密.可配合ESP使用.

Authentication:IPsec框架中的一个功能,用来验证数据完整性,并确保数据在传输过程中没有被篡改,同时也可用来验证数据来源的合法性(验证数据来源).

Certification Authority (CA): 权威认证.第三方受信机构.提供CA证书或发布不信任认证.

Certificate:一个包含标志身份和公钥的加密签名对象

Certificate Revocation List (CRL): 不信任列表,由CA颁布的.

Crypto map: 加密映射,CISCO IOS的一个配置功能语句,提供3个主要功能:一,选择需要加密的数据流(通过调用ACL),二,定义策略(通过调用转换集),三,设置对等体

Data integrity: 数据完整性机制,通过密钥或公钥确保数据传输过程中没有被篡改.

Data confidentiality: 数据机密性,通过加密或者只让伙伴知道KEY值的方法来保证数据不被其他人读取.

Data origin authentication: 数据源验证,一种安全服务,确保数据是来自正确的发送方,服务要求数据完整性+KEY分发机制(一个密钥只能是发送和接受方知道)

Data Encryption Standard (DES): 数据加密标注,使用密钥加密分组,CISCO-IPSEC使用56位长密钥加密分组

Diffie-Hellman:一种确保共享KEY安全穿越不安全网络的方法,它是OAKLEY的一个组成部分.

Encapsulating Security Payload (ESP): 封装安全有效负载,一种提供数据加密的协议,同时支持验证和防重发功能,它完整封装用户数据,可独自使用或与AH配合使用.

Hash: 哈西,散列算法,将变长分组转化成定长摘要.CISCO在IPSEC中使用SHA (Secure Hash Algorithm )和MD5(Message Digest 5)两种方法.
HMAC:使用SHA,MD5进行消息验证的一种机制.

Internet Key Exchange (IKE): internet key交换.,一种在Internet Security Association and Key Management Protocol (ISAKMP) 框架中使用Oakley和SKEME协议组的混合协议.IKE通常用来确定一个共享的安全策略和对需要KEY 的KEY服务的验证,在IPSEC流量能通过之前,先要对router/firewall/host 这些对等体进行身份验证.可以在双边手工输入预共享(pre-share)ke'y或者通过CA获得KEY,通过双边协商双边获得统一IKE的SA,建立 初步的安全通道,为接下来的IPSEC作准备.

Internet Security Association and Key Management Protocol (ISAKMP):一种协议框架,定义一种KEY交换和安全策略协商的

Message Digest 5 (MD5):MD5消息摘要,和SHA一样从MD4发展而来的,产生一个128位长的摘要,SHA比MD5更安全,但更耗资源.

Oakley: 一种KEY交换协议,它的一个基本机制就是Diffie-Hellman KEY交换算法

Perfect Forward Secrecy (PFS): PFS ensures that a given IPSec SA key was not derived from any other secret (like some other keys). In other words, if someone breaks a key, PFS ensures that the attacker is not able to derive any other key. If PFS is not enabled, someone can potentially break the IKE SA secret key, copy all the IPSec protected data, and then use knowledge of the IKE SA secret in order to compromise the IPSec SAs setup by this IKE SA. With PFS, breaking IKE does not give an attacker immediate access to IPSec. The attacker needs to break each IPSec SA individually. The Cisco IOS IPSec implementation uses PFS group 1 (D-H 768 bit) by default.

Replay-detection: A security service where the receiver can reject old or duplicate packets in order to defeat replay attacks (replay attacks rely on the attacker sending out older or duplicate packets to the receiver and the receiver thinking that the bogus traffic is legitimate). Replay-detection is done by using sequence numbers combined with authentication, and is a standard feature of IPSec.

RSA: A public key cryptographic algorithm (named after its inventors, Rivest, Shamir and Adleman) with a variable key length. RSA's main weakness is that it is significantly slow to compute compared to popular secret-key algorithms, such as DES. Cisco's IKE implementation uses a Diffie-Hellman exchange to get the secret keys. This exchange can be authenticated with RSA (or pre-shared keys). With the Diffie-Hellman exchange, the DES key never crosses the network (not even in encrypted form), which is not the case with the RSA encrypt and sign technique. RSA is not a public domain, and must be licensed from RSA Data Security.

Security Association (SA): An instance of security policy and keying material applied to a data flow. Both IKE and IPSec use SAs, although SAs are independent of one another. IPSec SAs are unidirectional and they are unique in each security protocol. A set of SAs are needed for a protected data pipe, one per direction per protocol. For example, if you have a pipe that supports ESP between peers, one ESP SA is required for each direction. SAs are uniquely identified by destination (IPSec endpoint) address, security protocol (AH or ESP), and security parameter index (SPI).
IKE negotiates and establishes SAs on behalf of IPSec. A user can also establish IPSec SAs manually.
An IKE SA is used by IKE only. Unlike the IPSec SA, it is bi-directional.


Secure Hash Algorithm (SHA): A one way hash put forth by NIST. SHA is closely modeled after MD4 and produces a 160-bit digest. Because SHA produces a 160-bit digest, it is more resistant to brute-force attacks than 128-bit hashes (such as MD5), but it is slower.

Transform: A transform describes a security protocol (AH or ESP) with its corresponding algorithms. For example, ESP with the DES cipher algorithm and HMAC-SHA for authentication.

Transport Mode: An encapsulation mode for AH/ESP. Transport Mode encapsulates the upper layer payload (such as Transmission Control Protocol (TCP) or User Datagram Protocol (UDP)) of the original IP datagram. This mode can only be used when the peers are the endpoints of the communication. The contrast of Transport Mode is Tunnel Mode.

Tunnel Mode: Encapsulation of the complete IP Datagram for IPSec. Tunnel Mode is used on order to protect datagrams sourced from or destined to non-IPSec systems (such as in a Virtual Private Network (VPN) scenario).


IKE的存在主要是为了IPSEC协商SA,它为IPSEC进行了铺路.两边对等体要就IKE的安全策略进行协商,我们可以定义多个IKE策略在每一边, 最终对等体协商一个双方都相同的策略.IKE第一阶段协商成功IKE SA(主交换模式),然后进行IPSEC SA的协商(快速交换模式),2阶段协商成功后,可以进行正常的IPSEC数据通信了.

IKE的策略配置主要包含:
1.加密算法 encryption 默认DES
2.散列算法 hash 默认:SHA 如果路由器不够强大,建议使用 MD5
3.密钥交换 group 默认 1
4.验证方法 authentication 默认 rsa-sig 如果使用RSA-SG则要用CA建立KEY,如果使用pre-share则在路由器中配置key
5.IKE SA生命周期 lefttime 默认 86400秒 一天.

router(config)#crypto isakmp policy 1
进入IKE 策略编辑模式,后面的数字序号可以区别各个策略,且数字越小被能被优先使用
router(config-isakmp)#encryption 3des
默认的加密方式

router(config-isakmp)#group 2
Diffie-Hellman 密钥交换方法,Group 1 is 768 bits long, and group 2 is 1024 bits long.路由器不够强大建议使用group 1,默认也是1

router(config-isakmp)#hash sha
散列算法,默认SHA,路由器不够强大就使用MD5

router(config-isakmp)#lifetime 500
IKE SA生命周期,默认86400秒,也就是一天,路由器不够强大则不建议太短.

router(config-isakmp)#authentication pre-share
验证方法,默认RSA-SG,使用RSA-SG需要配合CA.使用pre-share就需要使用crypto isakmp key **** address peer-address来指定key

router(config-isakmp)#exit

router(config)#crypto isakmp key cisco1234 address 192.168.10.38
这里的KEY要和对等体的配置一样.

You are now done with IKE configuration. These lines are the IKE configuration of the peer (the complete configurations for both routers are in the Sample Configurations section of this document):

crypto isakmp policy 1
encryption 3des
hash sha
group 2
authentication pre-share
lifetime 500

crypto isakmp key cisco1234 address 192.168.10.66

接下来
Create extended ACL.

router(config)#access-list 101 permit ip 192.168.3.0 0.0.0.255 10.3.2.0 0.0.0.255

Create IPSec transform(s).
router(config)#crypto ipsec transform-set ccsp esp-3des ah-sha-hmac esp-sha-hmac
注释:这里在两端路由器唯一不同的参数是ccsp,这是为这种选项组合所定义的名称。在两端的路由器上,这个名称可以相同,也可以不同。以上命令是定义所使用的IPSec参数。为了加强安全性,要启动验证报头。(有人说AH都被ESP取代了,那么这里的ah-sha-hmac能不能省略不写呢?当然可以!)由于两个网络都使用私有地址空间,需要通过隧道传输数据,因此还要使用安全封装协议。最后,还要定义3DES作为保密密码钥加密算法。

router(cfg-crypto-trans)#mode transport
注释:IPSec 机制中, ESP 封装尤为重要。 ESP 有两种工作模式:传输模式( Transport Mode )和隧道模式( Tunneling Mode ),默认是传输模式。
1 .传输模式
   传输模式的工作原理是在 IP 包的包头与数据报之间插入一个 ESP 头,并将数据报进行加密,然后在 Internet 网上传输。这种模式的特点是保留了原 IP 头信息,即信源 / 宿地址不变,所有安全相关信息包括在 ESP 头中。传输双方依此进行安全封装传输和折封还原。 ESP 传输模式适用于主机与主机的安全通信。显然这种安全方式可将通信两端由源到宿的基于虚拟连接的传输信息进行加密。
2 .隧道模式
ESP 隧道模式的工作原理是先将 IP 数据包整个进行加密后再加上 ESP 头和新的 IP 头,这个新的 IP 头中包含有隧道源 / 宿的地址。当通过 ESP 隧道的数据包到达目的网关(即隧道的另一端)后,利用 ESP 头中的安全相关信息对加密过的原 IP 包进行安全相关处理,将已还原的高层数据按原 IP 头标明的 IP 地址递交,以完成信源 —— 信宿之间的安全传输。显然,这种安全相关对于源 / 宿地址来说应是双向的。 ESP 隧道模式可用于下列情况的安全服务:
1) 用于网关与网关之间保护内部网络。通过配置,一个网关可与多个网关建立 IPSec 的安全互联,从而实现具有相同安全策略的 VPN 。这种借助于安全关联的可配置保护模式,可以使得内部一些主机通过网关 —— 网关的 IPSec 隧道,另一些主机虽通过网关 —— 网关进行 Internet 通信,但并不经过 IPSec 隧道。这种 VPN 就有了应用的灵活性。
2) 用于网关与主机或主机与网关之间的安全保护, IPSec 隧道建在网关与主机之间。其中通过配有 IPSec 模块的安全网关保护一个内部网络,而另一侧保护的是一台主机。

Create crypto map.
router(config)#crypto map kelvin 10 ipsec-isakmp
router(config-crypto-map)#set peer 192.168.10.38
router(config-crypto-map)#set transform-set ccsp 这里还可以继续写多个转换集名
router(config-crypto-map)#match address 101

Apply crypto map tothe interface.
router(config)#interface e0
router(config-if)#crypto map kelvin

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