Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3319179
  • 博文数量: 631
  • 博客积分: 10716
  • 博客等级: 上将
  • 技术积分: 8397
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 22:35
文章分类

全部博文(631)

文章存档

2020年(2)

2019年(22)

2018年(4)

2017年(37)

2016年(22)

2015年(1)

2013年(12)

2012年(20)

2011年(19)

2010年(20)

2009年(282)

2008年(190)

分类: 网络与安全

2008-05-24 11:52:27

在PIX防火墙用预共享密钥配置IPSec加密主要涉及到4个关键任务:
一、为IPSec做准备

为IPSec做准备涉及到确定详细的加密策略,包括确定我们要保护的主机和网络,选择一种认证方法,确定有关IPSec对等体的详细信息,确定我们所需的IPSec特性,并确认现有的访问控制列表允许IPSec数据流通过;
步骤1:根据对等体的数量和位置在IPSec对等体间确定一个IKE(IKE阶段1,或者主模式 )策略;

步骤2:确定IPSec(IKE阶段2,或快捷模式)策略,包括IPSec对等体的细节信息,例如IP地址及IPSec变换集和模式;

步骤3:用”write terminal”、”show isakmp”、”show isakmp policy”、”show crypto map “命令及其他”show”命令来检查当前的配置;

步骤4:确认在没有使用加密前网络能够正常工作,用”ping”命令并在加密前运行测试数据流来排除基本的路由故障;

步骤5:确认在边界路由器和PIX防火墙中已有的访问控制列表允许IPSec数据流通过,或者想要的数据流将可以被过滤出来。

二、配置IKE

配置IKE涉及到启用IKE(和isakmp是同义词),创建IKE策略,和验证我们的配置;


步骤1:用”isakmp enable”命令来启用或关闭IKE;

步骤2:用”isakmp policy”命令创建IKE策略;

步骤3:用”isakmp key”命令和相关命令来配置预共享密钥;

步骤4:用”show isakmp [policy]”命令来验证IKE的配置。


三、配置IPSec

IPSec配置包括创建加密用访问控制列表,定义变换集,创建加密图条目,并将加密集应用到接口上去;


步骤1:用access-list命令来配置加密用访问控制列表;

例如:

access-list acl-name {permit|deny} protocol src_addr src_mask [operator port [port]] dest_addr dest_mask [operator prot [port]]

步骤2:用crypto ipsec transform-set 命令配置变换集;

例如:

crypto ipsec transform-set transform-set-name transform1 [transform2 [transform3]]

步骤3:(任选)用crypto ipsec security-association lifetime命令来配置全局性的IPSec 安全关联的生存期;

步骤4:用crypto map 命令来配置加密图;

步骤5:用interface 命令和crypto map map-name interface应用到接口上;

步骤6:用各种可用的show命令来验证IPSec的配置。

四、测试和验证IPSec

该任务涉及到使用"show " 、"debug"和相关的命令来测试和验证IPSec加密工作是否正常,并为之排除故障。

[page]
样例:
PIX 1的配置:
!configure the IP address for each PIX Firewall interface

ip address outside 192.168.1.1 255.255.255.0

ip address inside 10.1.1.3 255.255.255.0

ip address dmz 192.168.11.1 255.255.255.0

global (outside) 1 192.168.1.10-192.168.1.254 netmask 255.255.255.0

!creates a global pooll on the outside interface,enables NAT.

!windows NT server

static (inside,outside) 192.168.1.10 10.1.1.4 netmask 255.255.255.0

!Crypto access list specifiles between the global and the inside

!server beind PIX Firewalls is encrypted ,The source

!and destination IP address are the global IP addresses of the statics.

Access-list 101 permit ip host 192.168.1.10 host 192.168.2.10

!The conduit permit ICMP and web access for testing.

Conduit permit icmp any any

Conduit permit tcp host 192.168.1.10 eq www any

route outside 0.0.0.0 0.0.0.0 192.168.1.2 1

!Enable IPSec to bypass access litst,access ,and confuit restrictions

syspot connnection permit ipsec

!Defines a crypto map transform set to user esp-des

crypto ipsec transform-set pix2 esp-des

crypto map peer2 10 ipsec-isakmp!


完全配置:


ip address outside 202.105.113.194 255.255.255.0 /*看电信给你的IP

ip address inside 192.168.1.1 255.255.255.0

!

global (outside) 1 202.105.113.195-202.105.113.200

global (outside) 1 202.105.113.201

nat (inside) 1 0.0.0.0 0.0.0.0 0 0

static (inside,outside) 202.105.113.203 192.168.1.10 netmask 255.255.255.255 0 0

static (inside,outside) 202.105.113.205 192.168.1.11netmask 255.255.255.255 0 0

conduit permit icmp any any

conduit permit tcp host 202.105.113.203 eq www any

conduit permit tcp host 202.105.113.203 eq ftp any

conduit permit tcp host 202.105.113.205 eq smtp any

conduit permit tcp host 202.105.113.205 eq pop3 any

!

route outside 0.0.0.0 0.0.0.0 202.105.113.193 1

route inside 0.0.0.0 0.0.0.0 192.168.1.1

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