天天看點

CISCO PIX515E 防火牆的設定 - cunshen

CISCO PIX515E 防火牆的設定

在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

CISCO PIX515E 防火牆的設定 - cunshen