一、問題描述:使用AnyConnect client連接時,如何關閉的安全警告窗口?
二、原因分析:
AnyConnect Server(ASA)和AnyConect client(PC)上沒有受信任的證書。
三、解決方案:
1/ 在ASA和AnyConnect client導入第三方機構頒發的根證書和用戶證書;
參考鏈接:
ASA 8.x Manually Install 3rd Party Vendor Certificates for use with WebVPN Configuration Example
2/ 使用ASA自簽名證書。
參考鏈接:
ASA 8.x : VPN Access with the AnyConnect VPN Client Using Self-Signed Certificate Configuration Example
四、本文目的:
1/ 僅通過配置ASA自簽名證書(盡可能使用最少配置)、不涉及任何第三機構(頒發證書)、客戶端修改配置(盡可能修改最少/最簡單),來關閉該警告窗口.
2/ 使用IP地址連接AnyConnect(之前在論壇上,有人提到必須使用域名登錄才可以關閉警告窗口,其實使用IP也可以的~ o(* ̄▽ ̄*)o)
五、詳細步驟:
1/ 版本說明:
ASA:9.8.1
ASDM:7.10(1)
AnyConnect client:4.700136
2/ Topology

3/ ASA預配置
------------------------------------------------------------------
interface GigabitEthernet0/0
nameif outside
security-level 0
ip address 10.1.1.100 255.255.255.0
asdm image disk0:/asdm-7101.bin
webvpn
enable outside
anyconnect imagedisk0:/anyconnect-win-
4.700136
-webdeploy-k9.pkg 1
anyconnect enable
tunnel-group-list enable
access-list SPLIT extended permit ip 20.1.1.0 255.255.255.0 any
ip local pool VPN-POOL 192.168.1.1-192.168.1.254 mask 255.255.255.0
group-policy SSL-GROUP internal
group-policy SSL-GROUP attributes
vpn-tunnel-protocolssl-client ssl-clientless
split-tunnel-policytunnelspecified
split-tunnel-network-listvalue SPLIT
address-pools value VPN-POOL
tunnel-group SSL-TUNNEL type remote-access
tunnel-group SSL-TUNNEL general-attributes
default-group-policySSL-GROUP
tunnel-group SSL-TUNNEL webvpn-attributes
group-alias SSL-VPN enable
4/ 在ASA上生成自簽名證書,並把trustpoint應用到outside接口上(注意:此處fqdn指定outside接口地址而不是域名)
crypto key generate rsa label sslvpnkeypair
crypto ca trustpoint localtrust
enrollment self
fqdn 10.1.1.100
subject-name CN=10.1.1.100
keypair sslvpnkeypair
crypto ca enroll localtrust noconfirm
ssl trust-point localtrust outside
參考鏈接:
ASA 8.x : VPN Access with the AnyConnect VPN Client Using Self-Signed Certificate Configuration Example
Step 1. Configure a Self-Issued Certificate-Command Line Example
5/ 登錄Anyconnect,勾選 “Always trust this server and import the certificate” - 點擊 “Connect Anyway”

彈出登錄驗證窗口
6/ 再次連接Anyconnect,無警告窗口。
至此利用ASA自簽名證書關閉Anyconnect警告窗口。
六、需要注意的問題:
1/ 證書路徑:
通常如果想要在
Windows
客戶端導入證書,需要在如下路徑導入用戶證書:

而AnyConnect client導入的證書路徑如下:
2/ 如果想要使用域名登錄,記得利用AnyConnect profile 創建server-list,配置FQDN以及建立domain 與接口IP地址解析關系;如果沒有域名服務器,可以手動修改Windows hosts 進行解析。
參考鏈接:
Cisco AnyConnect Secure Mobility Client Administrator Guide, Release 4.0
https://www.cisco.com/c/en/us/td/docs/security/vpn_client/anyconnect/anyconnect40/administration/guide/b_AnyConnect_Administrator_Guide_4-0/anyconnect-profile-editor.html#ID-1430-00000254
Easily Edit the Hosts File in Windows 10
https://www.petri.com/easily-edit-hosts-file-windows-10
本文copy自思科論壇
原文鏈接:http://bbs.csc-china.com.cn/forum.php?mod=viewthread&tid=988888&page=1#pid1034552