通過IKE協(xié)商方式建立IPSec隧道示例
通過IKE協(xié)商方式建立IPSec隧道示例
一、組網(wǎng)需求
如圖所示,HX為企業(yè)分支網(wǎng)關(guān),GY為企業(yè)總部網(wǎng)關(guān),分支與總部通過公網(wǎng)建立通信。分支子網(wǎng)為10.1.2.0/24,總部子網(wǎng)為10.1.1.0/24。GY和HX兩個(gè)站點(diǎn)用戶均可以正常訪問互聯(lián)網(wǎng)2.2.2.2。
企業(yè)希望對(duì)分支子網(wǎng)與總部子網(wǎng)之間相互訪問的流量進(jìn)行安全保護(hù)。分支與總部通過公網(wǎng)建立通信,可以在分支網(wǎng)關(guān)與總部網(wǎng)關(guān)之間建立一個(gè)IPSec隧道來(lái)實(shí)施安全保護(hù)。

二、操作步驟
采用如下步驟配置采用IKE協(xié)商方式建立IPSec隧道:
1、分別在GY和HX上配置接口的IP地址和默認(rèn)路由
2、分別在GY和HX上配置ACL,定義各自要保護(hù)的數(shù)據(jù)流
3、分別在GY和HX上創(chuàng)建IPSec安全提議,定義IPSec的保護(hù)方法。
4、分別在GY和HX上上配置IKE對(duì)等體,定義對(duì)等體間IKE協(xié)商時(shí)的屬性。
5、創(chuàng)建安全策略,并引用ACL、IPSec安全提議和IKE對(duì)等體,確定對(duì)何種數(shù)據(jù)流采取何種保護(hù)方法。
6、分別在GY和HX的接口上應(yīng)用各自的安全策略組,使接口具有IPSec的保護(hù)功能。
三、配置文件
1、GY相關(guān)配置文件
# acl number 3101 rule 5 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255 acl number 3102 rule 10 deny ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255 rule 20 permit ip # ipsec proposal tran1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-128 # ike proposal 5 encryption-algorithm aes-cbc-128 dh group14 authentication-algorithm md5 # ike peer spub v1 pre-shared-key cipher %$%$HqV9'^.AY<;@@wEMv,CQ,.2n%$%$ ike-proposal 5 local-address 100.1.1.1 remote-address 200.1.1.1 # ipsec policy map1 10 isakmp security acl 3101 ike-peer spub proposal tran1 # interface GigabitEthernet0/0/0 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 100.1.1.1 255.255.255.252 ipsec policy map1 nat outbound 3102 # interface GigabitEthernet0/0/2 # interface NULL0 # ip route-static 0.0.0.0 0.0.0.0 100.1.1.2
2、HX相關(guān)配置文件
# acl number 3101 rule 5 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255 # ipsec proposal tran1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-128 # ike proposal 5 encryption-algorithm aes-cbc-128 dh group14 authentication-algorithm md5 # ike peer spua v1 pre-shared-key cipher %$%$HqV9'^.AY<;@@wEMv,CQ,.2n%$%$ ike-proposal 5 local-address 200.1.1.1 remote-address 100.1.1.1 # ipsec policy use1 10 isakmp security acl 3101 ike-peer spua proposal tran1 # firewall zone Local priority 15 # interface GigabitEthernet0/0/0 ip address 10.1.2.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 200.1.1.1 255.255.255.252 ipsec policy use1 # interface GigabitEthernet0/0/2 # interface NULL0 # ip route-static 0.0.0.0 0.0.0.0 200.1.1.2

浙公網(wǎng)安備 33010602011771號(hào)