• 全部
  • 經驗案例
  • 典型配置
  • 技術公告
  • FAQ
  • 漏洞說明
  • 全部
  • 全部
  • 大數據引擎
  • 知了引擎
產品線
搜索
取消
案例類型
發布者
是否解決
是否官方
時間
搜索引擎
匹配模式
高級搜索

Ipsec 對接

1天前提問
  • 0關注
  • 0收藏,74瀏覽
粉絲:0人 關注:11人

問題描述:

總部與兩個分支對接ipsec,總部與分支1已成功對接成功,總部與分支2對接不成功,但是總部與分支2查看ike 都已經成功,但是ipsec不成功。總部與兩個分支對接,必須要使用策略模版嗎?

2 個回答
粉絲:148人 關注:8人

不是的


1、組網


2、需求

建立ipsec vpn實現各分支和總部之間互通,並且各分支之間也能通過總部訪問。總部是固定ip地址,分支IP地址不固定,並且分支AB處無人值守且分支無主動自動訪問總部的業務運行,所以為了防止分支設備斷電重啟後無法主動建立隧道,需要通過NQA來實現設備斷電重啟後自動觸發隧道建立。

配置步驟

3、關鍵配置

總部:

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 1.1.1.2 255.255.255.252

 nat outbound 3002

 ipsec apply policy test

#

 ip route-static 0.0.0.0 0 1.1.1.1

#

acl advanced 3000

 description toBranchA

 rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

 rule 5 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

#

acl advanced 3001

 description toBranchB

 rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.3.0 0.0.0.255

 rule 5 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.3.0 0.0.0.255

#

acl advanced 3002

 description outboundNATDenyFlow

 rule 0 deny ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

 rule 5 deny ip source 192.168.3.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

 rule 10 deny ip source 192.168.1.0 0.0.0.255 destination 192.168.3.0 0.0.0.255

 rule 15 deny ip source 192.168.2.0 0.0.0.255 destination 192.168.3.0 0.0.0.255

 rule 100 permit ip

#

ipsec transform-set 1

 esp encryption-algorithm 3des-cbc

 esp authentication-algorithm md5

#

ipsec policy-template branchA 1

 transform-set 1

 security acl 3000

 ike-profile branchA

#

ipsec policy-template branchB 1

 transform-set 1

 security acl 3001

 ike-profile branchB

#

ipsec policy test 1 isakmp template branchA

#

ipsec policy test 2 isakmp template branchB

#

ike dpd interval 10 on-deman 

#

ike profile branchA

 keychain branchA

 exchange-mode aggressive

 local-identity fqdn headquarters

 match remote identity fqdn branchA

#

ike profile branchB

 keychain branchB

 exchange-mode aggressive

 local-identity fqdn headquarters

 match remote identity fqdn branchB

#

ike proposal 1

 encryption-algorithm 3des-cbc

 authentication-algorithm md5

#

ike keychain branchA

 match local address 1.1.1.2

 pre-shared-key hostname branchA key cipher $c$3$nng95cm/zlG3ghvIRim5saZ3bMEhoJD+Ow==

#

ike keychain branchB

 match local address 1.1.1.2

 pre-shared-key hostname branchB key cipher $c$3$Rl2okdkTYNBEYWd32X25LOWYkYo5YCcrgw==

#

 

分支A

#

nqa entry admin test

 type icmp-echo

  destination ip 192.168.1.1

  frequency 5000

  history-record enable

  history-record number 10

  probe count 10

  probe timeout 500

  source ip 192.168.2.1

#

nqa entry admin test1

 type icmp-echo

  destination ip 192.168.3.1

  frequency 5000

  history-record enable

  history-record number 10

  probe count 10

  probe timeout 500

  source ip 192.168.2.1

#

 nqa schedule admin test start-time now lifetime forever

 nqa schedule admin test1 start-time now lifetime forever

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 2.2.2.2 255.255.255.252

 nat outbound 3001

 ipsec apply policy 1

#

 ip route-static 0.0.0.0 0 2.2.2.1

#

acl advanced 3000

 rule 0 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255

 rule 5 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.3.0 0.0.0.255

#

acl advanced 3001

 rule 0 deny ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255

 rule 5 deny ip source 192.168.2.0 0.0.0.255 destination 192.168.3.0 0.0.0.255

 rule 100 permit ip

#

ipsec transform-set 1

 esp encryption-algorithm 3des-cbc

 esp authentication-algorithm md5

#

ipsec policy 1 1 isakmp

 transform-set 1

 security acl 3000

 remote-address 1.1.1.2

 ike-profile 1

#

ike dpd interval 10 on-demand

#

ike profile 1

 keychain 1

 exchange-mode aggressive

 local-identity fqdn branchA

 match remote identity fqdn headquarters

#

ike proposal 1

 encryption-algorithm 3des-cbc

 authentication-algorithm md5

#

ike keychain 1

 pre-shared-key address 1.1.1.2 255.255.255.0 key cipher $c$3$5QlYyBFEZTju/oTPut9zgP5JNpmVleBIbA==

#

 

分支B

#

nqa entry admin test

 type icmp-echo

  destination ip 192.168.1.1

  frequency 5000

  history-record enable

  history-record number 10

  probe count 10

  probe timeout 500

  source ip 192.168.3.1

#

nqa entry admin test1

 type icmp-echo

  destination ip 192.168.2.1

  frequency 5000

  history-record enable

  history-record number 10

  probe count 10

  probe timeout 500

  source ip 192.168.3.1

#

 nqa schedule admin test start-time now lifetime forever

 nqa schedule admin test1 start-time now lifetime forever

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 3.3.3.2 255.255.255.252

 nat outbound 3001

 ipsec apply policy 1

#

 ip route-static 0.0.0.0 0 3.3.3.1

#

acl advanced 3000

 rule 0 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.1.0 0.0.0.255

 rule 5 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

#

acl advanced 3001

 rule 0 deny ip source 192.168.3.0 0.0.0.255 destination 192.168.1.0 0.0.0.255

 rule 5 deny ip source 192.168.3.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

 rule 100 permit ip

#

ipsec transform-set 1

 esp encryption-algorithm 3des-cbc

 esp authentication-algorithm md5

#

ipsec policy 1 1 isakmp

 transform-set 1

 security acl 3000

 remote-address 1.1.1.2

 ike-profile 1

#

ike dpd interval 10 on-demand

#

ike profile 1

 keychain 1

 exchange-mode aggressive

 local-identity fqdn branchB

 match remote identity fqdn headquarters

#

ike proposal 1

 encryption-algorithm 3des-cbc

 authentication-algorithm md5

#

ike keychain 1

 pre-shared-key address 1.1.1.2 255.255.255.0 key cipher $c$3$5QlYyBFEZTju/oTPut9zgP5JNpmVleBIbA==

#

4、測試

分支A側可以ping通總部和分支B


暫無評論

粉絲:29人 關注:1人

在IPsec配置中,策略模版並非必須使用,但它提供了一種靈活的配置方式,特別是在多分支與中心總部的連接場景中。策略模版允許中心設備(如總部)使用一個模板來定義IPsec策略,而分支設備則可以基於這個模板自動建立連接,無需每個分支都單獨配置策略。

對於您提到的情況,總部與分支1成功對接,而與分支2的IPsec不成功,盡管IKE階段已經成功,這可能是因為IPsec策略配置不匹配或網絡配置問題。以下是一些可能的檢查點:

1. **IPsec策略匹配**:確保總部和分支2的IPsec策略(包括加密算法、認證算法、生命周期等)完全匹配。
2. **ACL配置**:檢查ACL是否正確配置,確保它允許總部與分支2之間的流量。
3. **接口配置**:確認總部的接口上正確應用了IPsec策略。
4. **NAT穿越**:如果存在NAT,確保NAT穿越配置正確,尤其是在總部的防火牆上。
5. **安全域和策略**:如果總部是防火牆,檢查相關接口是否已加入到正確的安全域,並且安全策略是否允許流量通過。

如果總部與兩個分支的連接都使用策略模版,這將簡化配置管理,但不是唯一的方法。您可以根據具體需求選擇是否使用策略模版。如果遇到配置問題,檢查上述提到的配置點,以確定問題所在。


暫無評論

編輯答案

你正在編輯答案

如果你要對問題或其他回答進行點評或詢問,請使用評論功能。

分享擴散:

提出建議

    +

親~登錄後才可以操作哦!

確定

親~檢測到您登陸的賬號未在http://hclhub.h3c.com進行注冊

注冊後可訪問此模塊

跳轉hclhub

你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作

舉報

×

侵犯我的權益 >
對根叔社區有害的內容 >
辱罵、歧視、挑釁等(不友善)

侵犯我的權益

×

泄露了我的隱私 >
侵犯了我企業的權益 >
抄襲了我的內容 >
誹謗我 >
辱罵、歧視、挑釁等(不友善)
騷擾我

泄露了我的隱私

×

您好,當您發現根叔知了上有泄漏您隱私的內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到pub.zhiliao@h3c.com 郵箱,我們會盡快處理。
  • 1. 您認為哪些內容泄露了您的隱私?(請在郵件中列出您舉報的內容、鏈接地址,並給出簡短的說明)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)

侵犯了我企業的權益

×

您好,當您發現根叔知了上有關於您企業的造謠與誹謗、商業侵權等內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到 pub.zhiliao@h3c.com 郵箱,我們會在審核後盡快給您答複。
  • 1. 您舉報的內容是什麼?(請在郵件中列出您舉報的內容和鏈接地址)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)
  • 3. 是哪家企業?(營業執照,單位登記證明等證件)
  • 4. 您與該企業的關係是?(您是企業法人或被授權人,需提供企業委托授權書)
我們認為知名企業應該坦然接受公眾討論,對於答案中不準確的部分,我們歡迎您以正式或非正式身份在根叔知了上進行澄清。

抄襲了我的內容

×

原文鏈接或出處

誹謗我

×

您好,當您發現根叔知了上有誹謗您的內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到pub.zhiliao@h3c.com 郵箱,我們會盡快處理。
  • 1. 您舉報的內容以及侵犯了您什麼權益?(請在郵件中列出您舉報的內容、鏈接地址,並給出簡短的說明)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)
我們認為知名企業應該坦然接受公眾討論,對於答案中不準確的部分,我們歡迎您以正式或非正式身份在根叔知了上進行澄清。

對根叔社區有害的內容

×

垃圾廣告信息
色情、暴力、血腥等違反法律法規的內容
政治敏感
不規範轉載 >
辱罵、歧視、挑釁等(不友善)
騷擾我
誘導投票

不規範轉載

×

舉報說明