O conjunto de documentação deste produto faz o possível para usar uma linguagem imparcial. Para os fins deste conjunto de documentação, a imparcialidade é definida como uma linguagem que não implica em discriminação baseada em idade, deficiência, gênero, identidade racial, identidade étnica, orientação sexual, status socioeconômico e interseccionalidade. Pode haver exceções na documentação devido à linguagem codificada nas interfaces de usuário do software do produto, linguagem usada com base na documentação de RFP ou linguagem usada por um produto de terceiros referenciado. Saiba mais sobre como a Cisco está usando a linguagem inclusiva.
A Cisco traduziu este documento com a ajuda de tecnologias de tradução automática e humana para oferecer conteúdo de suporte aos seus usuários no seu próprio idioma, independentemente da localização. Observe que mesmo a melhor tradução automática não será tão precisa quanto as realizadas por um tradutor profissional. A Cisco Systems, Inc. não se responsabiliza pela precisão destas traduções e recomenda que o documento original em inglês (link fornecido) seja sempre consultado.
Este documento descreve como solicitar, instalar, confiar e renovar determinados tipos de certificados no software Cisco ASA gerenciado com CLI.
A Cisco recomenda que você tenha conhecimento destes tópicos:
As informações neste documento são baseadas nestas versões de software e hardware:
As informações neste documento foram criadas a partir de dispositivos em um ambiente de laboratório específico. Todos os dispositivos utilizados neste documento foram iniciados com uma configuração (padrão) inicial. Se a rede estiver ativa, certifique-se de que você entenda o impacto potencial de qualquer comando.
Os tipos de certificados que este documento aborda são certificados autoassinados, certificados assinados por uma autoridade de certificação de terceiros ou CA interna, no software Cisco Adaptive Security Appliance gerenciado com a interface de linha de comando (CLI).
Quando um certificado CA confiável é instalado, com crypto ca trustpoint authenticate,
ele pode ser usado para autenticar diferentes tipos de conexões VPN usando a autenticação de certificado. Ele é controlado com o comando validation-usage
trustpoint. Os tipos de uso de validação são:
Por padrão, o comando permite a validação para ipsec-client e ssl-client.
Desabilite o uso de validação para pontos de confiança não intencionais. Se um certificado CA não tiver a intenção de autenticar pares VPN ou usuários, desabilite o uso de validação para esse ponto confiável.
trustpoint public-root-ca no validation-usage
Por padrão, um certificado CA confiável pode ser usado para autenticar um par VPN ou usuário que se conecta a qualquer grupo de túneis. É necessário conceber uma autorização adequada.
Use mapas de certificado e mapas de grupo de túneis para garantir que somente os certificados autorizados sejam usados para grupos de túneis específicos. Defina uma regra de mapa de grupo de túneis padrão, que aponte para um grupo de túneis sem acesso para restringir o acesso não autorizado.
A autenticação de certificado só é permitida para:
Os usuários com outros certificados são atribuídos a no_access tunnel-group por padrão, graças ao tunnel-group-map default-group no_access
comando. As regras de mapa de certificados têm prioridade sobre group-url graças ao tunnel-group-map enable rules
comando. Conhecer group-url não ajuda a ignorar as Regras de Mapa de Certificados.
! Configure group-policy preventing VPN access:
group-policy no_access_gp internal group-policy no_access_gp attributes banner value NO ACCESS GROUP POLICY (...) vpn-simultaneous-logins 0 !
! Configure tunnel-groups for users:
tunnel-group mgmt-tunnel type remote-access tunnel-group mgmt-tunnel general-attributes address-pool vpn_pool default-group-policy mgmt-tunnel tunnel-group mgmt-tunnel webvpn-attributes authentication certificate group-url https://ftd.example.com/mgmt enable ! tunnel-group users_access type remote-access tunnel-group users_access general-attributes default-group-policy user_access_gp address-pool vpn_pool tunnel-group users_access webvpn-attributes authentication certificate group-url https://ftd.example.com/users enable !
! Configure tunnel-group preventing VPN access:
tunnel-group no_access type remote-access tunnel-group no_access general-attributes default-group-policy no_access_gp address-pool vpn_pool tunnel-group no_access webvpn-attributes authentication certificate !
! Create certificate maps for users:
crypto ca certificate map mgmt_tunnel_map 10 issuer-name attr cn eq example.com subject-name attr ou eq machines
! crypto ca certificate map users_access_map 10 issuer-name attr cn eq example.com subject-name attr ou eq users !
! Configure webvpn to use the certificate maps for tunnel-group mapping:
webvpn (...) certificate-group-map mgmt_tunnel_map 10 mgmt-tunnel certificate-group-map users_access_map 10 users_access !
! Enable tunnel-group maps and set the default tunnel-group preventing access if a user certificate did not match any other certificate map:
tunnel-group-map enable rules tunnel-group-map default-group no_access
!
Para obter instruções de configuração mais detalhadas, consulte a documentação da Cisco:
Note: Por padrão, a chave RSA com o nome Default-RSA-Key e um tamanho de 2048 é usada; no entanto, é recomendável usar um nome exclusivo para cada certificado para que eles não usem o mesmo par de chaves privado/público.
ASAv(config)# crypto key generate rsa label SELF-SIGNED-KEYPAIR modulus 2048 INFO: The name for the keys will be: SELF-SIGNED-KEYPAIR Keypair generation process begin. Please wait...
O par de chaves gerado pode ser visto com o comando show crypto key mypubkey rsa.
ASAv# show crypto key mypubkey rsa (...) Key pair was generated at: 14:52:49 CEDT Jul 15 2022 Key name: SELF-SIGNED-KEYPAIR Usage: General Purpose Key Key Size (bits): 2048 Storage: config Key Data: 30820122 300d0609 2a864886 f70d0101 01050003 82010f00 3082010a 02820101 ... 59dcd7d7 c3ee77f5 bbd0988d 515e390e b8d95177 dfaf6b94 a9df474b 1ec3b4a4 af020301 0001
ASAv(config)# crypto ca trustpoint SELF-SIGNED ASAv(config-ca-trustpoint)# enrollment self
Caution: O parâmetro FQDN deve corresponder ao FQDN ou ao endereço IP da interface ASA para a qual o certificado é usado. Esse parâmetro define o SAN (Nome Alternativo da Entidade) do certificado.
ASAv(config-ca-trustpoint)# fqdn asavpn.example.com ASAv(config-ca-trustpoint)# subject-name CN=asavpn.example.com,O=Example Inc,C=US,St=California,L=San Jose
ASAv(config-ca-trustpoint)# keypair SELF-SIGNED-KEYPAIR ASAv(config-ca-trustpoint)# exit
ASAv(config)# crypto ca enroll SELF-SIGNED WARNING: The certificate enrollment is configured with an fqdn that differs from the system fqdn. If this certificate will be used for VPN authentication this may cause connection problems. Would you like to continue with this enrollment? [yes/no]: yes % The fully-qualified domain name in the certificate will be: asa.example.com % Include the device serial number in the subject name? [yes/no]: no Generate Self-Signed Certificate? [yes/no]: yes ASAv(config)# exit
show crypto ca certificates
. ASAv# show crypto ca certificates SELF-SIGNED Certificate Status: Available Certificate Serial Number: 62d16084 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: unstructuredName=asa.example.com L=San Jose ST=California C=US O=Example Inc CN=asa.example.com Subject Name: unstructuredName=asa.example.com L=San Jose ST=California C=US O=Example Inc CN=asa.example.com Validity Date: start date: 15:00:58 CEDT Jul 15 2022 end date: 15:00:58 CEDT Jul 12 2032 Storage: config Associated Trustpoints: SELF-SIGNED
Note: Por padrão, a chave RSA com o nome Default-RSA-Key e um tamanho de 2048 é usada; no entanto, é recomendável usar um nome exclusivo para cada certificado para que eles não usem o mesmo par de chaves privado/público.
ASAv(config)# crypto key generate rsa label CA-SIGNED-KEYPAIR modulus 2048 INFO: The name for the keys will be: CA-SIGNED-KEYPAIR Keypair generation process begin. Please wait...
O par de chaves gerado pode ser visto com o comando show crypto key mypubkey rsa.
ASAv# show crypto key mypubkey rsa (...) Key pair was generated at: 14:52:49 CEDT Jul 15 2022 Key name: CA-SIGNED-KEYPAIR Usage: General Purpose Key Key Size (bits): 2048 Storage: config Key Data: 30820122 300d0609 2a864886 f70d0101 01050003 82010f00 3082010a 02820101 ... 59dcd7d7 c3ee77f5 bbd0988d 515e390e b8d95177 dfaf6b94 a9df474b 1ec3b4a4 af020301 0001
ASAv(config)# crypto ca trustpoint CA-SIGNED ASAv(config-ca-trustpoint)# enrollment terminal
ASAv(config-ca-trustpoint)# fqdn asavpn.example.com ASAv(config-ca-trustpoint)# subject-name CN=asavpn.example.com,O=Example Inc,C=US,St=California,L=San Jose
ASAv(config-ca-trustpoint)# keypair CA-SIGNED-KEYPAIR
ASAv(config-ca-trustpoint)# revocation-check ocsp
ASAv(config)# crypto ca authenticate CA-SIGNED Enter the base 64 encoded CA certificate. End with the word "quit" on a line by itself ASAv(config)# crypto ca authenticate CA-SIGNED Enter the base 64 encoded CA certificate. End with the word "quit" on a line by itself -----BEGIN CERTIFICATE----- MIIDXDCCAkSgAwIBAgIIDM/QY/h29+kwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UE BhMCUEwxDzANBgNVBAoTBnd3LXZwbjEMMAoGA1UECxMDbGFiMRcwFQYDVQQDEw5j YS5leGFtcGxlLmNvbTAeFw0xNTAyMDYxNDEwMDBaFw0zMDAyMDYxNDEwMDBaMEUx CzAJBgNVBAYTAlBMMQ8wDQYDVQQKEwZ3dy12cG4xDDAKBgNVBAsTA2xhYjEXMBUG A1UEAxMOY2EuZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK AoIBAQDI6pth5KFFTB29LynOg9/CTiOGYa+WFTcZXSLHZA6WTUzLYM19IbSFHWa6 gTeBnHqToLRnQoB51QlxEA45ArL2G98aew8BMD08GXkxWayforwLA3U9WZVTZsVN 4noWaXH1boGGD7+5vk0esJfL2B7pEhGodLh7Gki1T4KoqL/lDM9LqkzOctZkCT7f SkXvFik1Z1cZEGn6b2umnIqaVZ81ewIuTHOX48ls3uxTPH8+B5QG0+d1waOsbCWk oK5sEPpHZ3IQuVxGiirp/zmomzxl4G/tel6eyMOpjpnVtDYjQ9HNkQdQT5LKwRsX Oj9xKnYCbPfg3p2FdH7wJh1lK3prAgMBAAGjUDBOMAwGA1UdEwQFMAMBAf8wHQYD VR0OBBYEFE55kZsbra9b9tLFV52U47em9uXaMB8GA1UdIwQYMBaAFE55kZsbra9b 9tLFV52U47em9uXaMA0GCSqGSIb3DQEBCwUAA4IBAQArsXlFwK3jlNBwOsYh5mqT cGqeyDMRhs3Rs/wD25M2wkAF4AYZHgN9gK9VCK+ModKMQZy4X/uhj65NDU7oFf6f z9kqaRijsx153jV/YLk8E9oAIatnA/fQfX6V+h74yqucfF1js3d1FjyV14odRPwM 0jRyjalH56BFlackNc7KRddtVxYB9sfEbFhN8odlBvnUedxGAJFHqxEQKmBE+h4w gW8YnHOvM08svyTXSLlJf0UCdmAY+lG0gqhUlSlkFBtLRt6Z2uCot00NoMHI0hh5 dcVcovOi/PAxnrAlJ+Ng2jrWFN3MXWZO4S3CHYMGkWqHkaHChlqDOx9badgfsyzz -----END CERTIFICATE----- quit INFO: Certificate has these attributes: Fingerprint: e9ad165c 2673424c 6e7e0c5f b30b4a02 Do you accept this certificate? [yes/no]: yes WARNING: CA certificates can be used to validate VPN connections, by default. Please adjust the validation-usage of this trustpoint to limit the validation scope, if necessary. Trustpoint CA certificate accepted. % Certificate successfully imported
Note: A CA pode alterar os parâmetros FQDN e Nome do assunto definidos no ponto de confiança ao assinar o CSR e criar o certificado de identidade assinado.
ASAv(config)# crypto ca enroll CA-SIGNED WARNING: The certificate enrollment is configured with an fqdn that differs from the system fqdn. If this certificate will be used for VPN authentication this may cause connection problems. Would you like to continue with this enrollment? [yes/no]: yes % Start certificate enrollment .. % The subject name in the certificate will be: CN=asavpn.example.com,O=Example Inc,C=US,St=California,L=San Jose % The fully-qualified domain name in the certificate will be: asavpn.example.com % Include the device serial number in the subject name? [yes/no]: no Display Certificate Request to terminal? [yes/no]: yes Certificate Request follows: -----BEGIN CERTIFICATE REQUEST----- MIIDHzCCAgcCAQAwgYsxGzAZBgNVBAMMEmFzYXZwbi5leGFtcGxlLmNvbTEUMBIG A1UECgwLRXhhbXBsZSBJbmMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y bmlhMREwDwYDVQQHDAhTYW4gSm9zZTEhMB8GCSqGSIb3DQEJAgwSYXNhdnBuLmV4 YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5cvZVr1j Me8Mz4T3vgT1Z8DAAR0avs/TBdYiqGdjyiV/3K92IIT/0r8cuAUe5rR4sjTvaXYC SycSbwKc4kZbr3x120ss8Itd5g4kBdrUSCprl+VMiTphQgBTAqRPk0vFX4rC8k/T 0PFDE+2gjT1wMn9reb92jYrolGK4MWZdCzqowLPjEj5cCwu8Pv5h4hqTpudms+v4 g3R1OODmeyv4uEMYLS/noPxZXZ8YiQMiG2EP2Bg0KOT3Fzx0mVuekonQtRhiZt+c zyyfSRoqyBSakEZBwABod8q1Eg5J/pH130JlitOUJEyIlFoVHqv3jL7zfA9ilInu NaHkir062VQNXwIDAQABoE4wDwYJKoZIhvcNAQkHMQITADA7BgkqhkiG9w0BCQ4x LjAsMAsGA1UdDwQEAwIFoDAdBgNVHREEFjAUghJhc2F2cG4uZXhhbXBsZS5jb20w DQYJKoZIhvcNAQELBQADggEBAM3Q3zvp9G3MWP7R4wkpnBOH2CNUmPENIhHNjQjH Yh08EOvWyoo9FaLfHKVDLvFXh0vn5osXBmPLuVps6Ta4sBRUNicRoAmmA0pDWL9z Duu8BQnBGuN08T/H3ydjaNoPJ/f6EZ8gXY29NXEKb/+A2Tt0VVUTsYreGS+84Gqo ixFOtW8R50IXg+afAVOAh81xVUFOvuAi9DsiuvufMb4wdngQSOel/B9Zgp/BfGMl l0ApgejACoJAGmyrn9Tj6Z/6/lbpKBKpf4VE5UXdj7WLAjw5JF/X2NrH3/cQsczi G2Yg2dr3WpkTIY2W/kVohTiohVRkgXOMCecUaMlYxJyLTRQ= -----END CERTIFICATE REQUEST----- Redisplay enrollment request? [yes/no]: no
ASAv(config)# crypto ca import CA-SIGNED certificate WARNING: The certificate enrollment is configured with an fqdn that differs from the system fqdn. If this certificate will be used for VPN authentication this may cause connection problems.
Would you like to continue with this enrollment? [yes/no]: yes % The fully-qualified domain name in the certificate will be: asavpn.example.com Enter the base 64 encoded certificate. End with the word "quit" on a line by itself -----BEGIN CERTIFICATE----- MIIDoTCCAomgAwIBAgIIKbLY8Qt8N5gwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UE BhMCUEwxDzANBgNVBAoTBnd3LXZwbjEMMAoGA1UECxMDbGFiMRcwFQYDVQQDEw5j (...) kzAihRuFqmYYUeQP2Byp/S5fNqUcyZfAczIHt8BcPmVO9l6iSF/ULGlzXMSOUX6N d/LHXwrcTpc1zU+7qx3TpVDZbJlwwF+BWTBlxgM0BosJx65u/n75KnbBhGUE75jV HX2eRzuhnnSVExCoeyed7DLiezD8 -----END CERTIFICATE----- quit INFO: Certificate successfully imported
show crypto ca certificates
. ASAv# show crypto ca certificates CA-SIGNED CA Certificate Status: Available Certificate Serial Number: 0ccfd063f876f7e9 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Subject Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Validity Date: start date: 15:10:00 CEST Feb 6 2015 end date: 15:10:00 CEST Feb 6 2030 Storage: config Associated Trustpoints: CA-SIGNED Certificate Status: Available Certificate Serial Number: 29b2d8f10b7c3798 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Subject Name: unstructuredName=asavpn.example.com L=San Jose ST=California C=US O=Example Inc CN=asavpn.example.com Validity Date: start date: 15:33:00 CEDT Jul 15 2022 end date: 15:33:00 CEDT Jul 15 2023 Storage: config Associated Trustpoints: CA-SIGNED
Inscreva-se no arquivo PKCS12 que contém o par de chaves, o certificado de identidade e, opcionalmente, a cadeia de certificados CA recebidos de sua CA.
ASAv(config)# crypto ca trustpoint Trustpoint-PKCS12 ASAv(config-ca-trustpoint)# exit
Note: O par de chaves importado é nomeado após o nome do ponto confiável.
ASAv(config-ca-trustpoint)# revocation-check ocsp
Note: O arquivo PKCS12 precisa ser codificado na base64. Se os caracteres imprimíveis forem vistos quando o arquivo for aberto no editor de texto, ele será codificado na base64. Para converter um arquivo binário para a forma codificada na base64, openssl pode ser usado.
openssl enc -base64 -in asavpnpkcs12chain.example.com.pfx -out asavpnpkcs12chain.example.com.pfx.txtComando:
crypto ca import trustpoint pkcs12 passphrase [ nointeractive ]
ASAv(config)# crypto ca import TP-PKCS12 pkcs12 cisco123 Enter the base 64 encoded pkcs12. End with the word "quit" on a line by itself: MIIN4gIBAzCCDawGCSqGSIb3DQEHAaCCDZ0Egg2ZMIINlTCCCBcGCSqGSIb3DQEH BqCCCAgwgggEAgEAMIIH/QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIiK0c wqE3Tm0CAggAgIIH0NjxmJBuoPRuYl1VxTiawHzsL8kIl03lOj7tcWmECBwzsKKq (...) PXowMwYJKoZIhvcNAQkUMSYeJABhAHMAYQB2AHAAbgAuAGUAeABhAG0AcABsAGUA LgBjAG8AbTAtMCEwCQYFKw4DAhoFAAQUPXZZtBeqlh98wQljHW7J/hqoKcwECD05 dnxCNJx6 quit Trustpoint CA certificate accepted. WARNING: CA certificates can be used to validate VPN connections, by default. Please adjust the validation-usage of this trustpoint to limit the validation scope, if necessary. INFO: Import PKCS12 operation completed successfully.
ASAv# show crypto ca certificates TP-PKCS12 Certificate Status: Available Certificate Serial Number: 2b368f75e1770fd0 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Subject Name: unstructuredName=asavpn.example.com CN=asavpnpkcs12chain.example.com O=Example Inc L=San Jose ST=California C=US Validity Date: start date: 15:33:00 CEDT Jul 15 2022 end date: 15:33:00 CEDT Jul 15 2023 Storage: config Associated Trustpoints: TP-PKCS12 CA Certificate Status: Available Certificate Serial Number: 0ccfd063f876f7e9 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Subject Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Validity Date: start date: 15:10:00 CEST Feb 6 2015 end date: 15:10:00 CEST Feb 6 2030 Storage: config Associated Trustpoints: TP-PKCS12
No exemplo anterior, o PKCS12 continha a identidade e o certificado CA - as duas entradas - Certificate e CA Certificate. Caso contrário, somente o Certificado estará presente.
Se o PKCS12 não contiver o certificado CA e o certificado CA tiver sido obtido separadamente no formato PEM, ele poderá ser instalado manualmente.
ASAv(config)# crypto ca authenticate TP-PKCS12 Enter the base 64 encoded CA certificate. End with the word "quit" on a line by itself -----BEGIN CERTIFICATE----- MIIDXDCCAkSgAwIBAgIIDM/QY/h29+kwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UE BhMCUEwxDzANBgNVBAoTBnd3LXZwbjEMMAoGA1UECxMDbGFiMRcwFQYDVQQDEw5j (...) gW8YnHOvM08svyTXSLlJf0UCdmAY+lG0gqhUlSlkFBtLRt6Z2uCot00NoMHI0hh5 dcVcovOi/PAxnrAlJ+Ng2jrWFN3MXWZO4S3CHYMGkWqHkaHChlqDOx9badgfsyzz -----END CERTIFICATE----- quit INFO: Certificate has these attributes: Fingerprint: e9ad165c 2673424c 6e7e0c5f b30b4a02 Do you accept this certificate? [yes/no]: yes WARNING: CA certificates can be used to validate VPN connections, by default. Please adjust the validation-usage of this trustpoint to limit the validation scope, if necessary. Trustpoint CA certificate accepted. % Certificate successfully imported
# show crypto ca certificates SELF-SIGNED Certificate Status: Available Certificate Serial Number: 62d16084 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: unstructuredName=asa.example.com L=San Jose ST=California C=US O=Example Inc CN=asa.example.com Subject Name: unstructuredName=asa.example.com L=San Jose ST=California C=US O=Example Inc CN=asa.example.com Validity Date: start date: 15:00:58 CEDT Jul 15 2022 end date: 15:00:58 CEDT Jul 12 2032 Storage: config Associated Trustpoints: SELF-SIGNED
ASAv# conf t ASAv(config)# crypto ca enroll SELF-SIGNED WARNING: The certificate enrollment is configured with an fqdn that differs from the system fqdn. If this certificate will be used for VPN authentication this may cause connection problems. Would you like to continue with this enrollment? [yes/no]: yes WARNING: Trustpoint TP has already enrolled and has a device cert issued to it. If you successfully re-enroll this trustpoint, the current certificate will be replaced. Do you want to continue with re-enrollment? [yes/no]: yes % The fully-qualified domain name in the certificate will be: asa.example.com % Include the device serial number in the subject name? [yes/no]: no Generate Self-Signed Certificate? [yes/no]: yes ASAv(config)# exit
ASAv# show crypto ca certificates SELF-SIGNED Certificate Status: Available Certificate Serial Number: 62d16085 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: unstructuredName=asa.example.com L=San Jose ST=California C=US O=Example Inc CN=asa.example.com Subject Name: unstructuredName=asa.example.com L=San Jose ST=California C=US O=Example Inc CN=asa.example.com Validity Date: start date: 15:09:09 CEDT Jul 20 2022 end date: 15:09:09 CEDT Jul 17 2032 Storage: config Associated Trustpoints: SELF-SIGNED
Note: Se qualquer um dos novos elementos do certificado (assunto/fqdn, par de chaves) precisar ser alterado para o novo certificado, crie um novo certificado. Consulte a seção Inscrição usando CSR (Certificate Signing Request, Solicitação de assinatura de certificado). O próximo procedimento apenas atualiza a data de expiração do certificado.
ASAv# show crypto ca certificates CA-SIGNED Certificate Status: Available Certificate Serial Number: 29b2d8f10b7c3798 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Subject Name: unstructuredName=asavpn.example.com L=San Jose ST=California C=US O=Example Inc CN=asavpn.example.com Validity Date: start date: 15:33:00 CEDT Jul 15 2022 end date: 15:33:00 CEDT Jul 15 2023 Storage: config Associated Trustpoints: CA-SIGNED Certificate Subject Name: Status: Pending terminal enrollment Key Usage: General Purpose Fingerprint: 790aa617 c30c6894 0bdc0327 0d60b032 Associated Trustpoint: CA-SIGNED
Note: A CA pode alterar os parâmetros FQDN e Nome do assunto definidos no ponto de confiança ao assinar o CSR e criar o certificado de identidade assinado.
Note: Para o mesmo ponto confiável, sem assunto/fqdn alterado e configuração de par de chaves, as inscrições subsequentes dão o mesmo CSR que o inicial.
ASAv# conf t ASAv(config)# crypto ca enroll CA-SIGNED WARNING: The certificate enrollment is configured with an fqdn that differs from the system fqdn. If this certificate will be used for VPN authentication this may cause connection problems. Would you like to continue with this enrollment? [yes/no]: yes % Start certificate enrollment .. % The subject name in the certificate will be: CN=asavpn.example.com,O=Example Inc,C=US,St=California,L=San Jose % The fully-qualified domain name in the certificate will be: asavpn.example.com % Include the device serial number in the subject name? [yes/no]: no Display Certificate Request to terminal? [yes/no]: yes Certificate Request follows: -----BEGIN CERTIFICATE REQUEST----- MIIDHzCCAgcCAQAwgYsxGzAZBgNVBAMMEmFzYXZwbi5leGFtcGxlLmNvbTEUMBIG A1UECgwLRXhhbXBsZSBJbmMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y bmlhMREwDwYDVQQHDAhTYW4gSm9zZTEhMB8GCSqGSIb3DQEJAgwSYXNhdnBuLmV4 YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5cvZVr1j Me8Mz4T3vgT1Z8DAAR0avs/TBdYiqGdjyiV/3K92IIT/0r8cuAUe5rR4sjTvaXYC SycSbwKc4kZbr3x120ss8Itd5g4kBdrUSCprl+VMiTphQgBTAqRPk0vFX4rC8k/T 0PFDE+2gjT1wMn9reb92jYrolGK4MWZdCzqowLPjEj5cCwu8Pv5h4hqTpudms+v4 g3R1OODmeyv4uEMYLS/noPxZXZ8YiQMiG2EP2Bg0KOT3Fzx0mVuekonQtRhiZt+c zyyfSRoqyBSakEZBwABod8q1Eg5J/pH130JlitOUJEyIlFoVHqv3jL7zfA9ilInu NaHkir062VQNXwIDAQABoE4wDwYJKoZIhvcNAQkHMQITADA7BgkqhkiG9w0BCQ4x LjAsMAsGA1UdDwQEAwIFoDAdBgNVHREEFjAUghJhc2F2cG4uZXhhbXBsZS5jb20w DQYJKoZIhvcNAQELBQADggEBAM3Q3zvp9G3MWP7R4wkpnBOH2CNUmPENIhHNjQjH Yh08EOvWyoo9FaLfHKVDLvFXh0vn5osXBmPLuVps6Ta4sBRUNicRoAmmA0pDWL9z Duu8BQnBGuN08T/H3ydjaNoPJ/f6EZ8gXY29NXEKb/+A2Tt0VVUTsYreGS+84Gqo ixFOtW8R50IXg+afAVOAh81xVUFOvuAi9DsiuvufMb4wdngQSOel/B9Zgp/BfGMl l0ApgejACoJAGmyrn9Tj6Z/6/lbpKBKpf4VE5UXdj7WLAjw5JF/X2NrH3/cQsczi G2Yg2dr3WpkTIY2W/kVohTiohVRkgXOMCecUaMlYxJyLTRQ= -----END CERTIFICATE REQUEST----- Redisplay enrollment request? [yes/no]: no
ASAv(config)# crypto ca import CA-SIGNED certificate WARNING: The certificate enrollment is configured with an fqdn that differs from the system fqdn. If this certificate will be used for VPN authentication this may cause connection problems. Would you like to continue with this enrollment? [yes/no]: yes % The fully-qualified domain name in the certificate will be: asavpn.example.com Enter the base 64 encoded certificate. End with the word "quit" on a line by itself -----BEGIN CERTIFICATE----- MIIDgTCCAmmgAwIBAgIIMA+aIxCtNtMwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UE BhMCUEwxDzANBgNVBAoTBnd3LXZwbjEMMAoGA1UECxMDbGFiMRcwFQYDVQQDEw5j YS5leGFtcGxlLmNvbTAeFw0yMjA3MjAxNDA5MDBaFw0yMzA3MjAxNDA5MDBaMIGL MRswGQYDVQQDDBJhc2F2cG4uZXhhbXBsZS5jb20xFDASBgNVBAoMC0V4YW1wbGUg SW5jMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwI U2FuIEpvc2UxITAfBgkqhkiG9w0BCQIMEmFzYXZwbi5leGFtcGxlLmNvbTCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOXL2Va9YzHvDM+E974E9WfAwAEd Gr7P0wXWIqhnY8olf9yvdiCE/9K/HLgFHua0eLI072l2AksnEm8CnOJGW698ddtL LPCLXeYOJAXa1Egqa5flTIk6YUIAUwKkT5NLxV+KwvJP09DxQxPtoI09cDJ/a3m/ do2K6JRiuDFmXQs6qMCz4xI+XAsLvD7+YeIak6bnZrPr+IN0dTjg5nsr+LhDGC0v 56D8WV2fGIkDIhthD9gYNCjk9xc8dJlbnpKJ0LUYYmbfnM8sn0kaKsgUmpBGQcAA aHfKtRIOSf6R9d9CZYrTlCRMiJRaFR6r94y+83wPYpSJ7jWh5Iq9OtlUDV8CAwEA AaMuMCwwCwYDVR0PBAQDAgWgMB0GA1UdEQQWMBSCEmFzYXZwbi5leGFtcGxlLmNv bTANBgkqhkiG9w0BAQsFAAOCAQEAfQUchY4UjhjkySMJAh7NT3TT5JJ4NzqW8qHa wNq+YyHR+sQ6G3vn+6cYCU87tqWlY3fXC27TwweREwMbq8NsJrr80hsChYby8kwE LnTkrN7dJBl7u5OVQ3DRjfmFrJ9LEUaYZx1HYvcS1kAeEeVB4VJwVzeujWepcmEM p7cB6veTcF9rulDVRImd0KYEOx+HYav2INT2udc0G1yDwml/mqdf0/ON2SpBBpnE gtiKshtsST/NAw25WjkrDIfN8uR2z5xpzxnEDUBoHOipGlgb1I6G1ARXWO+LwfBl n1QD5b/RdQOUbLCpfKNPdE/9wNnoXGDlJ7qfZxrO4T7ld2Idug== -----END CERTIFICATE----- quit INFO: Certificate successfully imported
ASAv# show crypto ca certificates CA-SIGNED Certificate Status: Available Certificate Serial Number: 300f9a2310ad36d3 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Subject Name: unstructuredName=asavpn.example.com L=San Jose ST=California C=US O=Example Inc CN=asavpn.example.com Validity Date: start date: 16:09:00 CEDT Jul 20 2022 end date: 16:09:00 CEDT Jul 20 2023 Storage: config Associated Trustpoints: CA-SIGNED
Não é possível renovar um certificado no ponto confiável registrado usando o arquivo PKCS12. Para instalar um novo certificado, é necessário criar um novo ponto de confiança.
ASAv(config)# crypto ca trustpoint Trustpoint-PKCS12-2022 ASAv(config-ca-trustpoint)# exit
ASAv(config-ca-trustpoint)# revocation-check ocsp
Note: O arquivo PKCS12 precisa ser codificado na base64. Se os caracteres imprimíveis forem vistos quando o arquivo for aberto no editor de texto, ele será codificado na base64. Para converter um arquivo binário para a forma codificada na base64, o openssl pode ser usado.
openssl enc -base64 -in asavpnpkcs12chain.example.com.pfx -out asavpnpkcs12chain.example.com.pfx.txt
ASAv(config)# crypto ca import TP-PKCS12-2022 pkcs12 cisco123 Enter the base 64 encoded pkcs12. End with the word "quit" on a line by itself: MIIN4gIBAzCCDawGCSqGSIb3DQEHAaCCDZ0Egg2ZMIINlTCCCBcGCSqGSIb3DQEH BqCCCAgwgggEAgEAMIIH/QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIiK0c wqE3Tm0CAggAgIIH0NjxmJBuoPRuYl1VxTiawHzsL8kIl03lOj7tcWmECBwzsKKq (...) PXowMwYJKoZIhvcNAQkUMSYeJABhAHMAYQB2AHAAbgAuAGUAeABhAG0AcABsAGUA LgBjAG8AbTAtMCEwCQYFKw4DAhoFAAQUPXZZtBeqlh98wQljHW7J/hqoKcwECD05 dnxCNJx6 quit Trustpoint CA certificate accepted. WARNING: CA certificates can be used to validate VPN connections, by default. Please adjust the validation-usage of this trustpoint to limit the validation scope, if necessary. INFO: Import PKCS12 operation completed successfully.
Note: Se o novo arquivo PKCS12 contiver um certificado de identidade com o mesmo par de chaves que foi usado com o certificado antigo, o novo ponto confiável se referirá ao nome antigo do par de chaves.
Exemplo:
ASAv(config)# crypto ca import TP-PKCS12-2022 pkcs12 cisco123 Enter the base 64 encoded pkcs12. End with the word "quit" on a line by itself: MIIN4gIBAzCCDawGCSqGSIb3DQEHAaCCDZ0Egg2ZMIINlTCCCBcGCSqGSIb3DQEH ... dnxCNJx6 quit WARNING: Identical public key already exists as TP-PKCS12 ASAv(config)# show run crypto ca trustpoint TP-PKCS12-2022 crypto ca trustpoint TP-PKCS12-2022 keypair TP-PKCS12 no validation-usage crl configure
ASAv# show crypto ca certificates TP-PKCS12-2022 Certificate Status: Available Certificate Serial Number: 2b368f75e1770fd0 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Subject Name: unstructuredName=asavpn.example.com CN=asavpnpkcs12chain.example.com O=Example Inc L=San Jose ST=California C=US Validity Date: start date: 15:33:00 CEDT Jul 15 2022 end date: 15:33:00 CEDT Jul 15 2023 Storage: config Associated Trustpoints: TP-PKCS12-2022 CA Certificate Status: Available Certificate Serial Number: 0ccfd063f876f7e9 Certificate Usage: General Purpose Public Key Type: RSA (2048 bits) Signature Algorithm: RSA-SHA256 Issuer Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Subject Name: CN=ca.example.com OU=lab O=ww-vpn C=PL Validity Date: start date: 15:10:00 CEST Feb 6 2015 end date: 15:10:00 CEST Feb 6 2030 Storage: config Associated Trustpoints: TP-PKCS12-2022
No exemplo anterior, o PKCS12 continha o certificado de identidade e o certificado CA, portanto, duas entradas são vistas após a importação: Certificado e Certificado CA. Caso contrário, somente a entrada do Certificado estará presente.
Se o PKCS12 não contiver o certificado CA e o certificado CA tiver sido obtido separadamente no formato PEM, ele poderá ser instalado manualmente.
ASAv(config)# crypto ca authenticate TP-PKCS12-2022 Enter the base 64 encoded CA certificate. End with the word "quit" on a line by itself -----BEGIN CERTIFICATE----- MIIDXDCCAkSgAwIBAgIIDM/QY/h29+kwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UE BhMCUEwxDzANBgNVBAoTBnd3LXZwbjEMMAoGA1UECxMDbGFiMRcwFQYDVQQDEw5j (...) gW8YnHOvM08svyTXSLlJf0UCdmAY+lG0gqhUlSlkFBtLRt6Z2uCot00NoMHI0hh5 dcVcovOi/PAxnrAlJ+Ng2jrWFN3MXWZO4S3CHYMGkWqHkaHChlqDOx9badgfsyzz -----END CERTIFICATE----- quit INFO: Certificate has these attributes: Fingerprint: e9ad165c 2673424c 6e7e0c5f b30b4a02 Do you accept this certificate? [yes/no]: yes WARNING: CA certificates can be used to validate VPN connections, by default. Please adjust the validation-usage of this trustpoint to limit the validation scope, if necessary. Trustpoint CA certificate accepted. % Certificate successfully imported
Exemplo:
ASAv# show running-config ssl trust-point ssl trust-point TP-PKCS12 ASAv# conf t ASAv(config)#ssl trust-point TP-PKCS12-2022 ASAv(config)#exit
Note: Um ponto confiável pode ser usado em diferentes elementos de configuração. Verifique sua configuração onde o ponto de confiança antigo é usado.
Como definir as configurações de hora em um ASA.
Verifique essa referência para obter as etapas necessárias para configurar a hora e a data corretamente no ASA. Livro CLI 1: Guia de configuração da CLI de operações gerais do Cisco Secure Firewall ASA Series, 9.18
Revisão | Data de publicação | Comentários |
---|---|---|
4.0 |
27-Nov-2024 |
Seção adicionada e atualizada para Tradução Automática e Formatação. |
2.0 |
09-Jul-2024 |
Formatação atualizada. |
1.0 |
21-Mar-2023 |
Versão inicial |