網絡拓撲:
客戶反映Windows7 無法打開ASA SSL *** 登陸頁面 ,如圖4.1 。 但WindowsXP 一切正常,如圖4.2。 圖4.1. 圖4.2. 問題描述
http://www.cisco.com/en/US/docs/security/asa/asa80/command/reference/s8.html#wp1406272
結論
在承載了IE8 的Windows7中SSL加密組對於DES是關閉的,而在承載IE6 的WindowsXP中此SSL加密標準是開啓的,而客戶在ASA上人爲限定了SSL 加密組只接受DES協商,這才導致了此次故障的發生。將ASA SSL 加密組設置爲IE8 支持的SSL加密標準將可以解決此問題。
故障處理
出現此類問題時,我建議用戶首先收集log 文件來找到蛛絲馬跡,這也是我們處理問題解決問題的很好的敲門磚。
ciscoasa(config)#logging buffered debugging “ 將日誌級別調成debugging 級別。”
ciscoasa(config)#logging buffer-size 1048576 “將日誌buffer 容量擴大,已緩存更多的信息。”
ciscoasa(config)#logging on
此時讓客戶重新嘗試用windows7 登陸ASA SSL *** 首頁,通過日誌我們可以看到如下信息,請注意我將關鍵信息用粗體字標出
ciscoasa(config)#show log %ASA-6-302013: Built inbound TCP connection 3 for outside:72.163.226.242/59371 ( 72.163.226.242/59371) to identity:72.163.226.159/443 (72.163.226.159/443) %ASA-6-725001: Starting SSL handshake with client outside:72.163.226.242/58911 for TLSv1 session. %ASA-7-725010: Device supports the following 1 cipher(s). %ASA-7-725011: Cipher[1] : DES-CBC-SHA %ASA-7-725008: SSL client outside:72.163.226.242/58911 proposes the following 8 cipher(s). %ASA-7-725011: Cipher[1] : AES128-SHA %ASA-7-725011: Cipher[2] : AES256-SHA %ASA-7-725011: Cipher[3] : RC4-SHA %ASA-7-725011: Cipher[4] : DES-CBC3-SHA %ASA-7-725011: Cipher[5] : DHE-DSS-AES128-SHA %ASA-7-725011: Cipher[6] : DHE-DSS-AES256-SHA %ASA-7-725011: Cipher[7] : EDH-DSS-DES-CBC3-SHA %ASA-7-725011: Cipher[8] : RC4-MD5 %ASA-7-725014: SSL lib error. Function: SSL3_GET_CLIENT_HELLO Reason: no shared cipher %ASA-6-302014: Teardown TCP connection 77 for outside:72.163.226.242/58911 to identity:72.163.226.159/443 duration 0:00:00 bytes 7 TCP Reset-I
同過以上信息我們可以注意到SSL 的加密算法的協商在ASA與Windows7 之間出現了不匹配。
下面我們需要通過show ssl 命令來確定ASA SSL 加密算法情況。通過下面的輸出信息我們看到,只有DES-SHA1 加密算法被開啓,而其它加密算法均已關閉。我將關鍵字用粗體字標出。
ciscoasa# show ssl Accept connections using SSLv2, SSLv3 or TLSv1 and negotiate to SSLv3 or TLSv1 Start connections using SSLv3 and negotiate to SSLv3 or TLSv1 Enabled cipher order: des-sha1 Disabled ciphers: 3des-sha1 rc4-md5 rc4-sha1 aes128-sha1 aes256-sha1 null-sha1 --omitted--
到此時我們似乎已經有點眉目了,還記得嗎?客戶還曾經反映過WindowsXP 是沒有任何問題的,那麼我們讓客戶在用WindowsXP 登陸以下SSL ***首頁。我們再次收集一下日誌。我將重點用粗體字標出。
ciscoasa#show log %ASA-6-725001: Starting SSL handshake with client outside:72.163.226.170/4301 fo r TLSv1 session. %ASA-7-725010: Device supports the following 1 cipher(s). %ASA-7-725011: Cipher[1] : DES-CBC-SHA %ASA-7-725008: SSL client outside:72.163.226.170/4301 proposes the following 8 c ipher(s). %ASA-7-725011: Cipher[1] : RC4-MD5 %ASA-7-725011: Cipher[2] : RC4-SHA %ASA-7-725011: Cipher[3] : DES-CBC3-SHA %ASA-7-725011: Cipher[4] : DES-CBC-SHA %ASA-7-725011: Cipher[5] : EXP-RC4-MD5 %ASA-7-725011: Cipher[6] : EXP-RC2-CBC-MD5 %ASA-7-725011: Cipher[7] : EDH-DSS-DES-CBC3-SHA %ASA-7-725011: Cipher[8] : EDH-DSS-DES-CBC-SHA %ASA-7-725012: Device chooses cipher : DES-CBC-SHA for the SSL session with clie nt outside:72.163.226.170/4301 %ASA-6-725002: Device completed SSL handshake with client outside:72.163.226.170 /4300
目前問題根源已經明確,在協商SSL 加密算法的過程中, ASA SSL加密組只接受DES 加密, 承載了IE8 的Windows7 關閉了DES SSL加密。而承載IE6 的WindowsXP 是打開SSL DES加密的。
到目前爲止我們知道了問題的根源,那麼我們就開始解決它:
我們要知道SSL 加密組在ASA上是可定製的,具體命令是 ssl encryption
ciscoasa(config)# ssl encryption ? configure mode commands/options: 3des-sha1 Indicate use of 3des-sha1 for ssl encryption aes128-sha1 Indicate use of aes128-sha1 for ssl encryption aes256-sha1 Indicate use of aes256-sha1 for ssl encryption des-sha1 Indicate use of des-sha1 for ssl encryption null-sha1 Indicate use of null-sha1 for ssl encryption (NOTE: Data is NOT encrypted if this cipher is chosen) rc4-md5 Indicate use of rc4-md5 for ssl encryption rc4-sha1 Indicate use of rc4-sha1 for ssl encryption
既然有這個命令那麼我們就看看客戶到底定製了哪個SSL加密組:
ciscoasa(config)# show run ssl ssl encryption des-sha1
果然如此,客戶手工制定了SSL加密組在ASA ,Ok 我們就制定一組IE8 支持的加密組吧
ciscoasa(config)# ssl encryption aes128-sha1 ciscoasa(config)# show ssl Accept connections using SSLv2, SSLv3 or TLSv1 and negotiate to SSLv3 or TLSv1 Start connections using SSLv3 and negotiate to SSLv3 or TLSv1 Enabled cipher order: aes128-sha1 Disabled ciphers: 3des-sha1 des-sha1 rc4-md5 rc4-sha1 aes256-sha1 null-sha1 --omitted--
再讓客戶用Windows7 /IE8 嘗試登陸一次ASA SSL ***首頁 。 成功登陸,問題解決。 讓我們看看日誌的體現:
%ASA-6-725001: Starting SSL handshake with client outside:72.163.226.242/61132 f or TLSv1 session. %ASA-7-725010: Device supports the following 1 cipher(s). %ASA-7-725011: Cipher[1] : AES128-SHA %ASA-7-725008: SSL client outside:72.163.226.242/61132 proposes the following 8 cipher(s). %ASA-7-725011: Cipher[1] : AES128-SHA %ASA-7-725011: Cipher[2] : AES256-SHA %ASA-7-725011: Cipher[3] : RC4-SHA %ASA-7-725011: Cipher[4] : DES-CBC3-SHA %ASA-7-725011: Cipher[5] : DHE-DSS-AES128-SHA %ASA-7-725011: Cipher[6] : DHE-DSS-AES256-SHA %ASA-7-725011: Cipher[7] : EDH-DSS-DES-CBC3-SHA %ASA-7-725011: Cipher[8] : RC4-MD5 %ASA-7-725012: Device chooses cipher : AES128-SHA for the SSL session with clien t outside:72.163.226.242/61132 %ASA-6-725002: Device completed SSL handshake with client outside:72.163.226.242 /61132
在這裏我要提一下ASA上SSL encryption 這條命令,默認情況下不需要刻意指定加密組,加密組會ASA 會去嘗試匹配任何一個它支持的加密組,這是很多朋友沒有注意的問題
關於此命令的更詳細信息請參見以下連接: