兩邊訪問控制列表不對稱導致***故障

兩邊訪問控制列表不對稱

上個月在上海分公司出差,協助國內數據中心搬遷工作,在工作過程中碰到了一個因爲兩端配置的ACL訪問控制列表不一致導致,***連接出現異常的現象。

 網絡連接:  上海LAN <---> ASA <---------IPSEC ***-------------> ASA <--->日本LAN

 現象: 1 會話如果從從日本(initiator)發起,則連接正常,日本端的asa確認結果如下

china-glob-fw1# show isakmp

 Active SA: 1
 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 1

 IKE Peer: internet-site-china-dc1
 Type  : L2L  Role  : initiator
 Rekey  : no  State  : MM_ACTIVE

china-glob-fw1# show ipsec sa
interface: global-IF
 Crypto map tag: china-map, seq num: 10, local addr: 110.14.186.105

access-list 150 extended permit ip 172.10.86.0 255.255.255.0 10.136.0.0 255.255.192.0 log notifications
 local ident (addr/mask/prot/port): (172.10.86.0/255.255.255.0/0/0)
 remote ident (addr/mask/prot/port): (10.136.0.0/255.255.192.0/0/0
)
 current_peer: internet-site-china-dc1
 #pkts encaps: 2674, #pkts encrypt: 2674, #pkts digest: 2674
 #pkts decaps: 2670, #pkts decrypt: 2670, #pkts verify: 2670
 #pkts compressed: 0, #pkts decompressed: 0
 #pkts not compressed: 2674, #pkts comp failed: 0, #pkts decomp failed: 0
 #pre-frag successes: 0, #pre-frag failures: 0, #fragments created: 0
 #PMTUs sent: 0, #PMTUs rcvd: 0, #decapsulated frgs needing reassembly: 0
 #send errors: 0, #recv errors: 0

 local crypto endpt.: 110.14.186.105, remote crypto endpt.: internet-site-china-dc1
 path mtu 1500, ipsec overhead 58, media mtu 1500
 current outbound spi: 16ADCE89
 current inbound spi : 5ECDF889

 inbound esp sas:
 spi: 0x5ECDF889 (1590556809)
 transform: esp-3des esp-sha-hmac no compression
 in use settings ={L2L, Tunnel, PFS Group 2, }
 slot: 0, conn_id: 290816, crypto-map: china-map

 sa timing: remaining key lifetime (kB/sec): (3914780/27057)
 IV size: 8 bytes
 replay detection support: Y
 Anti replay bitmap:
 0xFFFFFFFF 0xFFFFFFFF
 outbound esp sas:
 spi: 0x16ADCE89 (380489353)
 transform: esp-3des esp-sha-hmac no compression
 in use settings ={L2L, Tunnel, PFS Group 2, }
 slot: 0, conn_id: 290816, crypto-map: china-map

 sa timing: remaining key lifetime (kB/sec): (3914780/27057)
 IV size: 8 bytes
 replay detection support: Y
 Anti replay bitmap:
 0x00000000 0x00000001

2 當初始會話是中國發起,就會發現ike協商正常,立即會話被切斷,然後有重新協商,反覆切斷,反覆協商,進入flapping狀態

 以下輸出顯示了flapping狀態

china-glob-fw1# show isakmp sa

 Active SA: 2
 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 2

 IKE Peer: internet-site-china-dc1
 Type  : L2L  Role  : responder
 Rekey  : no  State  : MM_WAIT_MSG5
 IKE Peer: internet-site-china-dc1
 Type  : L2L  Role  : responder
 Rekey  : no  State  : MM_WAIT_MSG5
china-glob-fw1# show ipsec sa

There are no ipsec sas
china-glob-fw1# show ipsec sashow isakmp sa

 Active SA: 1
 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 1

 IKE Peer: internet-site-china-dc1
 Type  : L2L  Role  : responder
 Rekey  : no  State  : MM_WAIT_MSG5
china-glob-fw1# show isakmp sa

 Active SA: 2
 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 2

 IKE Peer: internet-site-china-dc1
 Type  : L2L  Role  : responder
 Rekey  : no  State  : MM_WAIT_MSG5
 IKE Peer: internet-site-china-dc1
 Type  : user  Role  : responder
 Rekey  : no  State  : MM_WAIT_MSG3
china-glob-fw1# show isakmp sa

 Active SA: 1
 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 1

 IKE Peer: internet-site-china-dc1
 Type  : user  Role  : responder
 Rekey  : no  State  : MM_WAIT_MSG3
china-glob-fw1# show isakmp sa

 Active SA: 1
 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 1

 IKE Peer: internet-site-china-dc1
 Type  : L2L  Role  : responder
 Rekey  : no  State  : MM_WAIT_MSG5

china-glob-fw1# show isakmp sa

There are no isakmp sas
china-glob-fw1# show isakmp sa

There are no isakmp sas
china-glob-fw1# show isakmp sa

 Active SA: 1
 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 1

 IKE Peer: internet-site-china-dc1
 Type  : L2L  Role  : responder
 Rekey  : no  State  : MM_ACTIVE

china-glob-fw1# show logging

%ASA-5-713119: Group = 180.154.181.20, IP = 180.154.181.20, PHASE 1 COMPLETED
%ASA-3-713061: Group = 180.154.181.20, IP = 180.154.181.20, Rejecting IPSec tunnel: no matching crypto map entry for remote proxy 
10.136.0.0/255.255.0.0/0/0 local proxy 172.10.86.0/255.255.255.0/0/0 on interface global-IF
%ASA-3-713902: Group = 180.154.181.20, IP = 180.154.181.20, QM FSM error (P2 struct &0xd7c387d8, mess id 0x637d989d)!
%ASA-3-713902: Group = 180.154.181.20, IP = 180.154.181.20, Removing peer from correlator table failed, no match!
%ASA-5-713259: Group = 180.154.181.20, IP = 180.154.181.20, Session is being torn down. Reason: crypto map policy not found
%ASA-4-113019: Group = 180.154.181.20, Username =180.154.181.20, IP = internet-site-mixiu-dc1, Session disconnected. Session Type: IKE, Duration: 0h:00m:00s, Bytes xmt: 0, Bytes rcv: 0, Reason: crypto map policy not found
%ASA-5-713904: IP = 180.154.181.20, Received encrypted packet with no matching SA, dropping
%ASA-5-713119: Group = 180.154.181.20, IP = 180.154.181.20, PHASE 1 COMPLETED
%ASA-3-713061: Group = 180.154.181.20, IP = 180.154.181.20, Rejecting IPSec tunnel: no matching crypto map entry for remote proxy 
10.136.0.0/255.255.0.0/0/0 local proxy 172.10.86.0/255.255.255.0/0/0 on interface global-IF
%ASA-3-713902: Group = 180.154.181.20, IP = 180.154.181.20, QM FSM error (P2 struct &0xd7c387d8, mess id 0x12b07d87)!
%ASA-3-713902: Group = 180.154.181.20, IP = 180.154.181.20, Removing peer from correlator table failed, no match!
%ASA-5-713259: Group = 180.154.181.20, IP = 180.154.181.20, Session is being torn down. Reason: crypto map policy not found
%ASA-4-113019: Group = 180.154.181.20, Username = 180.154.181.20, IP = internet-site-mixiu-dc1, Session disconnected. Session Type: IKE, Duration: 0h:00m:00s, Bytes xmt: 0, Bytes rcv: 0, Reason: crypto map policy not found
%ASA-5-713904: IP = 180.154.181.20, Received encrypted packet with no matching SA, dropping

分析:通過以上日誌,初步斷定是兩邊的crypto map中的acl不一致導致,檢查兩邊的配置後發現

日本方的訪問控制列表配置如下:

access-list 150 extended permit ip 172.10.86.0 255.255.255.0 10.136.0.0 255.255.192.0

中國方的訪問控制列表:

 access-list 150 extended permit ip 10.136.0.0 255.255.0.0 172.10.86.0 255.255.255.0

可見正是由於以上ip網段的不同導致了,從日本發起會話可以成功(因爲10.136.0.0/255.255.192.0包含在10.136.0.0之內255.255.0.0,反之則會話被reject),而從中國發起會話不成功。

解決: 

 修改兩邊的訪問控制列表使之完全一致,問題解決。

 ------andy chou

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章