2024-07-18 08:53 AM
本ドキュメントは、FMCによって管理されるFTDにおける、Cisco Secure Client(旧Anyconnect)のユーザー認証と証明書認証を組み合わせる設定例と動作確認方法について紹介します。本ドキュメントは、Firepower Management Center Virtual 7.4.1、Firewall Threat Defense Virtual 7.4.1、Cisco Secure Client 5.1.3.62にて確認、作成をしております。
ユーザーと証明書ベースの認証を組み合わせることが、セキュリティを強化し、不正アクセスへの対策として一般的な実践となります。ユーザー体験とセキュリティを大幅に向上させることができる機能の一つに、Cisco Secure Clientでユーザー名を事前に入力する(pre-filled)機能があります。この機能により、ログインプロセスを簡略化し、リモートアクセスの全体的な効率を向上させます。
本ドキュメントでは、FTDにおける Cisco Secure Client の2要素認証を行う際、クライアントから送信された証明書の中にある共通名(Common Name)を抽出し、それをユーザー名として自動的に入力する設定例を紹介します。
本ドキュメントで使用されている各証明書の共通名(Common Name)を含む証明書チェーンは以下の通りです。
本ドキュメントは、以下の構成で、設定・動作確認例を紹介します。
「Devices > Device Management」に移動し、対象FTDを編集して「Interfaces」のタブで、インタフェースの情報を入力します。
GigabitEthernet0/0に対し、
GigabitEthernet0/1に対し、
「Devices > Device Management」に移動し、対象FTDを編集して「Device」のタブで、Cisco Secure Clientのライセンスが有効化されていることを確認します。
「Devices > VPN > Remote Access」に移動し、「Add」ボタンをクリックします。
必要な情報を入力して、「Next」ボタンをクリックします。
必要な情報を入力して、「Local Realm」項目の「+」ボタンをクリックします。
「Add Realm」プルダウンリストから「Local」をクリックし、新しい「local realm」を追加します。
必要な情報を入力して、「Save」ボタンをクリックします。
※ユーザー名(sslVPNClientCN)はクライアント証明書の中にある共通名(Common Name)と同じです。
「IPv4 Address Pools」項目の「edit」ボタンをクリックします。
必要な情報を入力し、追加されたアドレスプールをconnection profileにアサインします。
「Group Policy」項目の「+」ボタンをクリックします。
必要な情報を入力し、追加されたgroup policyをconnection profileにアサインします。
事前にFMCにアップロードしたイメージファイルを選択し、「Next」ボタンをクリックします。
必要な情報を入力して、「Certificate Enrollment」項目の「+」ボタンをクリックします。
必要な情報を入力してから、ローカルから対象証明書のPKCS12ファイルをアップロードし、FTD用のサーバー証明書を作成します。
「Next」ボタンをクリックします。
※本ドキュメントでは、「Bypass Access Control policy for decrypted traffic (sysopt permit-vpn)」機能を有効にしています。そのため、復号化されたVPNトラフィックはアクセス制御ポリシーによる検査を受けません。
上記で設定した内容のサマリを確認し、「Finish」ボタンをクリックします。
追加されたConnection Profileを確認します。
FMCでの設定内容をFTDにDeployした後、FTDのCLIで設定内容を確認します。
// Defines IP of interface
interface GigabitEthernet0/0
nameif outside
security-level 0
ip address 192.168.1.200 255.255.255.0
interface GigabitEthernet0/1
nameif inside
security-level 0
ip address 192.168.10.200 255.255.255.0
// Defines a pool of addresses
ip local pool ftdvpn-aaa-cert-pool 172.16.1.40-172.16.1.50 mask 255.255.255.0
// Defines a local user
username sslVPNClientCN password ***** encrypted
// Defines Trustpoint for Server Certificate
crypto ca trustpoint ftdvpn-cert
keypair ftdvpn-cert
crl configure
// Server Certificate Chain
crypto ca certificate chain ftdvpn-cert
certificate 22413df584b6726c
3082037c 30820264 a0030201 02020822 413df584 b6726c30 0d06092a 864886f7
......
quit
certificate ca 5242a02e0db6f7fd
3082036c 30820254 a0030201 02020852 42a02e0d b6f7fd30 0d06092a 864886f7
......
quit
// Configures the FTD to allow Cisco Secure Client connections and the valid Cisco Secure Client images
webvpn
enable outside
http-headers
hsts-server
enable
max-age 31536000
include-sub-domains
no preload
hsts-client
enable
x-content-type-options
x-xss-protection
content-security-policy
anyconnect image disk0:/csm/cisco-secure-client-win-5.1.3.62-webdeploy-k9.pkg 1 regex "Windows"
anyconnect enable
tunnel-group-list enable
cache
disable
error-recovery disable
// Bypass Access Control policy for decrypted traffic
// This setting is displayed in the 'show run all' command output
sysopt connection permit-vpn
// Configures the group-policy to allow SSL connections
group-policy ftdvpn-aaa-cert-grp internal
group-policy ftdvpn-aaa-cert-grp attributes
banner none
wins-server none
dns-server none
dhcp-network-scope none
vpn-simultaneous-logins 3
vpn-idle-timeout 30
vpn-idle-timeout alert-interval 1
vpn-session-timeout none
vpn-session-timeout alert-interval 1
vpn-filter none
vpn-tunnel-protocol ssl-client
split-tunnel-policy tunnelall
ipv6-split-tunnel-policy tunnelall
split-tunnel-network-list none
default-domain none
split-dns none
split-tunnel-all-dns disable
client-bypass-protocol disable
vlan none
address-pools none
webvpn
anyconnect ssl dtls enable
anyconnect mtu 1406
anyconnect firewall-rule client-interface public none
anyconnect firewall-rule client-interface private none
anyconnect ssl keepalive 20
anyconnect ssl rekey time none
anyconnect ssl rekey method none
anyconnect dpd-interval client 30
anyconnect dpd-interval gateway 30
anyconnect ssl compression none
anyconnect dtls compression none
anyconnect modules value none
anyconnect ask none default anyconnect
anyconnect ssl df-bit-ignore disable
// Configures the tunnel-group to use the aaa & certificate authentication
tunnel-group ftdvpn-aaa-cert-auth type remote-access
tunnel-group ftdvpn-aaa-cert-auth general-attributes
address-pool ftdvpn-aaa-cert-pool
default-group-policy ftdvpn-aaa-cert-grp
// These settings are displayed in the 'show run all' command output. Start
authentication-server-group LOCAL
secondary-authentication-server-group none
no accounting-server-group
default-group-policy ftdvpn-aaa-cert-grp
username-from-certificate CN OU
secondary-username-from-certificate CN OU
authentication-attr-from-server primary
authenticated-session-username primary
username-from-certificate-choice second-certificate
secondary-username-from-certificate-choice second-certificate
// These settings are displayed in the 'show run all' command output. End
tunnel-group ftdvpn-aaa-cert-auth webvpn-attributes
authentication aaa certificate
pre-fill-username client
group-alias ftdvpn-aaa-cert-auth enable
「Certificates - Current User > Personal > Certificates」に移動し、試験用のクライアント証明書(Common Name = sslVPNClientCN)を確認します。
クライアント証明書をダブルクリックし、「Details」に移動して、「Subject」の詳細を確認します。
「Certificates - Current User > Trusted Root Certification Authorities > Certificates」に移動し、試験用のCAがクライアント側にインポートされていることを確認します。
エンドポイントでAnyconnect接続を実行します。ユーザー名はクライアント証明書から抽出されますので、VPN認証のためにパスワードのみを入力する必要があります。
※本ドキュメントでは、ユーザー名はクライアント証明書のCN(Common Name)フィールドから抽出しています。
FMCの「Analysis > Users > Active Sessions」に移動し、VPNのActive セッションを確認します。
FTDのCLIで、「show vpn-sessiondb detail anyconnect」コマンドを実行して、VPNセッションを確認します。
ftd702# show vpn-sessiondb detail anyconnect
Session Type: AnyConnect Detailed
Username : sslVPNClientCN Index : 7
Assigned IP : 172.16.1.40 Public IP : 192.168.1.11
Protocol : AnyConnect-Parent SSL-Tunnel DTLS-Tunnel
License : AnyConnect Premium
Encryption : AnyConnect-Parent: (1)none SSL-Tunnel: (1)AES-GCM-128 DTLS-Tunnel: (1)AES-GCM-256
Hashing : AnyConnect-Parent: (1)none SSL-Tunnel: (1)SHA256 DTLS-Tunnel: (1)SHA384
Bytes Tx : 14780 Bytes Rx : 15386
Pkts Tx : 2 Pkts Rx : 37
Pkts Tx Drop : 0 Pkts Rx Drop : 0
Group Policy : ftdvpn-aaa-cert-grp Tunnel Group : ftdvpn-aaa-cert-auth
Login Time : 02:38:22 UTC Mon Jun 17 2024
Duration : 0h:01m:22s
Inactivity : 0h:00m:00s
VLAN Mapping : N/A VLAN : none
Audt Sess ID : cb00718200007000666fa19e
Security Grp : none Tunnel Zone : 0
AnyConnect-Parent Tunnels: 1
SSL-Tunnel Tunnels: 1
DTLS-Tunnel Tunnels: 1
AnyConnect-Parent:
Tunnel ID : 7.1
Public IP : 192.168.1.11
Encryption : none Hashing : none
TCP Src Port : 50035 TCP Dst Port : 443
Auth Mode : Certificate and userPassword
Idle Time Out: 30 Minutes Idle TO Left : 28 Minutes
Client OS : win
Client OS Ver: 10.0.15063
Client Type : AnyConnect
Client Ver : Cisco AnyConnect VPN Agent for Windows 5.1.3.62
Bytes Tx : 7390 Bytes Rx : 0
Pkts Tx : 1 Pkts Rx : 0
Pkts Tx Drop : 0 Pkts Rx Drop : 0
SSL-Tunnel:
Tunnel ID : 7.2
Assigned IP : 172.16.1.40 Public IP : 192.168.1.11
Encryption : AES-GCM-128 Hashing : SHA256
Ciphersuite : TLS_AES_128_GCM_SHA256
Encapsulation: TLSv1.3 TCP Src Port : 50042
TCP Dst Port : 443 Auth Mode : Certificate and userPassword
Idle Time Out: 30 Minutes Idle TO Left : 28 Minutes
Client OS : Windows
Client Type : SSL VPN Client
Client Ver : Cisco AnyConnect VPN Agent for Windows 5.1.3.62
Bytes Tx : 7390 Bytes Rx : 2292
Pkts Tx : 1 Pkts Rx : 3
Pkts Tx Drop : 0 Pkts Rx Drop : 0
DTLS-Tunnel:
Tunnel ID : 7.3
Assigned IP : 172.16.1.40 Public IP : 192.168.1.11
Encryption : AES-GCM-256 Hashing : SHA384
Ciphersuite : ECDHE-ECDSA-AES256-GCM-SHA384
Encapsulation: DTLSv1.2 UDP Src Port : 56382
UDP Dst Port : 443 Auth Mode : Certificate and userPassword
Idle Time Out: 30 Minutes Idle TO Left : 29 Minutes
Client OS : Windows
Client Type : DTLS VPN Client
Client Ver : Cisco AnyConnect VPN Agent for Windows 5.1.3.62
Bytes Tx : 0 Bytes Rx : 13094
Pkts Tx : 0 Pkts Rx : 34
Pkts Tx Drop : 0 Pkts Rx Drop : 0
VPNクライアントからサーバーへのpingを実施し、VPNクライアントとサーバー間の通信が成功していることを確認します。
FTDのCLIで、「capture in interface inside real-time」コマンドを実行して、パケットキャプチャを確認します。
ftd702# capture in interface inside real-time
Use ctrl-c to terminate real-time capture
1: 03:39:25.729881 172.16.1.40 > 192.168.10.11 icmp: echo request
2: 03:39:25.730766 192.168.10.11 > 172.16.1.40 icmp: echo reply
3: 03:39:26.816211 172.16.1.40 > 192.168.10.11 icmp: echo request
4: 03:39:26.818683 192.168.10.11 > 172.16.1.40 icmp: echo reply
5: 03:39:27.791676 172.16.1.40 > 192.168.10.11 icmp: echo request
6: 03:39:27.792195 192.168.10.11 > 172.16.1.40 icmp: echo reply
7: 03:39:28.807789 172.16.1.40 > 192.168.10.11 icmp: echo request
8: 03:39:28.808399 192.168.10.11 > 172.16.1.40 icmp: echo reply
FTDのLinaエンジンのデバッグログやWindows PCのDARTログは、VPN認証の詳細な動作を確認するために役立ちます。
以下は、本ドキュメントで試験時のLinaエンジン側で確認できたデバッグログです。
// Certificate Authentication
Jun 17 2024 02:38:03: %FTD-7-717029: Identified client certificate within certificate chain. serial number: 6EC79930B231EDAF, subject name: CN=sslVPNClientCN,OU=sslVPNClientOU,O=Cisco,L=Tokyo,ST=Tokyo,C=JP.
Jun 17 2024 02:38:03: %FTD-6-717028: Certificate chain was successfully validated with warning, revocation status was not checked.
Jun 17 2024 02:38:03: %FTD-6-717022: Certificate was successfully validated. serial number: 6EC79930B231EDAF, subject name: CN=sslVPNClientCN,OU=sslVPNClientOU,O=Cisco,L=Tokyo,ST=Tokyo,C=JP.
// Extract username from the CN (Common Name) field
Jun 17 2024 02:38:03: %FTD-7-113028: Extraction of username from VPN client certificate has been requested. [Request 5]
Jun 17 2024 02:38:03: %FTD-7-113028: Extraction of username from VPN client certificate has completed. [Request 5]
// User Authentication
Jun 17 2024 02:38:22: %FTD-6-113012: AAA user authentication Successful : local database : user = sslVPNClientCN
Jun 17 2024 02:38:22: %FTD-6-113009: AAA retrieved default group policy (ftdvpn-aaa-cert-grp) for user = sslVPNClientCN
Jun 17 2024 02:38:22: %FTD-6-113008: AAA transaction status ACCEPT : user = sslVPNClientCN
以下のデバッグはFTDのCLIから実行でき、設定のトラブルシューティングに役立つ情報を提供します。
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします
下記より関連するコンテンツにアクセスできます