動(dòng)態(tài)ipsec的配置
目前成都創(chuàng)新互聯(lián)已為近1000家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)頁空間、網(wǎng)站改版維護(hù)、企業(yè)網(wǎng)站設(shè)計(jì)、龍亭網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長(zhǎng),共同發(fā)展。
與靜態(tài)主要不一樣的是不用再指定安全聯(lián)盟sa了,這是透過密鑰協(xié)商的,主要用于配置較多的時(shí)候用到,快捷比靜態(tài)的。
一、Fw-1的配置
1)接口地址的配置
[fw-1]inter eth0/0
[fw-1-Ethernet0/0]ip add 192.168.101.55 255.255.255.0
[fw-1-Ethernet0/0]inter eth0/4
[fw-1-Ethernet0/4]ip add 1.1.1.1 255.255.255.0
查看端口是否加入了區(qū)域,若沒有加,要加入?yún)^(qū)域
2)配置訪問控制列表,起過濾數(shù)據(jù)流
[fw-1]acl number 3000
[fw-1-acl-adv-3000]rule 10 permit ip source 192.168.101.0 0.0.0.255 dest 192.168.102.0 0.0.0.255
[fw-1-acl-adv-3000]rule 20 deny ip source any dest any
3)配置安全提議(系統(tǒng)默認(rèn),可選)
[fw-1]ipsec proposal tran1
[fw-1-ipsec-proposal-tran1]encapsulation-mode tunnel
[fw-1-ipsec-proposal-tran1]transform esp
[fw-1-ipsec-proposal-tran1]esp encryption-algorithm des
[fw-1-ipsec-proposal-tran1]esp authentication-algorithm md5
4)配置鄰居參數(shù)。在全局了配置 //這里是與靜態(tài)手工配置不一樣的地方
[fw-1]ike peer fw-2
[fw-1-ike-peer-fw-2]pre-shared-key simple 123456(定義與共享密鑰)
[fw-1-ike-peer-fw-2]remote-address 1.1.2.2(定義對(duì)端的地址)
5)配置安全策略
[fw-1]ipsec policy policy1 10 isakmp(動(dòng)態(tài)配置安全策略)
[fw-1-ipsec-policy-isakmp-policy1-10]security acl 3000
[fw-1-ipsec-policy-isakmp-policy1-10]proposal tran1
[fw-1-ipsec-policy-isakmp-policy1-10]ike-peer fw-2
應(yīng)用安全策略
[fw-1]inter eth0/4
[fw-1-Ethernet0/4]ipsec policy policy1
二、路由器配置
[Router]inter e0
[Router-Ethernet0]ip add 1.1.1.2 255.255.255.0
[Router-Ethernet0]inter e1
[Router-Ethernet1]ip add 1.1.2.1 255.255.255.0
三、fw-2的配置
[fw-2]inter eth0/0
[fw-2-Ethernet0/0]ip add 192.168.102.90 255.255.255.0
[fw-2-Ethernet0/0]loop
[fw-2-Ethernet0/0]inter eth0/4
[fw-2-Ethernet0/4]ip add 1.1.2.2 255.255.255.0
把端口加入?yún)^(qū)域(如端口在默認(rèn)區(qū)域,不用在添加)
[fw-2]firewall zone untrust
[fw-2-zone-untrust]add interface eth0/4
[fw-2-zone-untrust]q
[fw-2]firewall zone trust
[fw-2-zone-trust]add interface eth0/0
配置訪問控制列表,起過濾作用
[fw-2]acl number 3000
[fw-2-acl-adv-3000]rule 10 permit ip source 192.168.102.0 0.0.0.255 dest 192.168.101.0 0.0.0.255
[fw-2-acl-adv-3000]rule 20 deny ip source any dest any
配置安全提議(系統(tǒng)默認(rèn),可選)
[fw-2]ipsec proposal tran1
[fw-2-ipsec-proposal-tran1]encapsulation-mode tunnel
[fw-2-ipsec-proposal-tran1]transform esp
[fw-2-ipsec-proposal-tran1]esp encryption-algorithm des
[fw-2-ipsec-proposal-tran1]esp authentication-algorithm md5
配置鄰居參數(shù)
[fw-2]ike peer fw-1
[fw-2-ike-peer-fw-1]pre-shared-key simple 123456
[fw-2-ike-peer-fw-1]remote-address 1.1.1.1
配置安全策略
[fw-2]ipsec policy policy1 10 isakmp
[fw-2-ipsec-policy-isakmp-policy1-10]security acl 3000
[fw-2-ipsec-policy-isakmp-policy1-10]proposal tran1
[fw-2-ipsec-policy-isakmp-policy1-10]ike-peer fw-1
應(yīng)用安全策略
[fw-2]inter eth0/4
[fw-2-Ethernet0/4]ipsec policy policy
測(cè)試結(jié)果
注:紅色部分是與靜態(tài)配置不一樣的地方。