Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure Policy-Based IPsec VPN with Certificates

This example shows how to configure, verify, and troubleshoot PKI. This topic includes the following sections:

Requirements

This example uses the following hardware and software components:

  • Junos OS Release 9.4 or later

  • Juniper Networks security devices

Before you begin:

  • Ensure that the internal LAN interface of the SRX Series device is ge-0/0/0 in zone trust and has a private IP subnet.

  • Ensure that the Internet interface of the device is ge-0/0/3 in zone untrust and has a public IP.

  • Ensure that all traffic between the local and remote LANs is permitted, and traffic can be initiated from either side.

  • Ensure that the SSG5 has been preconfigured correctly and loaded with a ready-to-use local certificate, CA certificate, and CRL.

  • Ensure that the SSG5 device is configured to use the FQDN of ssg5.example.net (IKE ID).

  • Ensure that PKI certificates with 1024-bit keys are used for the IKE negotiations on both sides.

  • Ensure that the CA is a standalone CA at the domain example.com for both VPN peers.

Overview

Figure 1 shows the network topology used for this example to configure a policy-based IPsec VPN to allow data to be securely transferred between a corporate office and a remote office.

Figure 1: Network Topology DiagramNetwork Topology Diagram

The PKI administration is the same for both policy-based VPNs and route-based VPNs.

In this example, the VPN traffic is incoming on interface ge-0/0/0.0 with the next hop of 10.1.1.1. Thus the traffic is outgoing on interface ge-0/0/3.0. Any tunnel policy must consider incoming and outgoing interfaces.

Optionally, you can use a dynamic routing protocol such as OSPF (not described in this document). When processing the first packet of a new session, the device running Junos OS first performs a route lookup. The static route, which is also the default route, dictates the zone for the outgoing VPN traffic.

Many CAs use hostnames (for example, FQDN) to specify various elements of the PKI. Because the CDP is usually specified using a URL containing an FQDN, you must configure a DNS resolver on the device running Junos OS.

The certificate request can be generated by the following methods:

  • Creating a CA profile to specify the CA settings

  • Generating the PKCS10 certificate request

The PKCS10 certificate request process involves generating a public or private key pair and then generating the certificate request itself, using the key pair.

Take note of the following information about the CA profile:

  • The CA profile defines the attributes of a certificate authority.

  • Each CA profile is associated with a CA certificate. If a new or renewed CA certificate needs to be loaded without removing the older CA certificate, a new profile must be created. This profile can also be used for online fetching of the CRL.

  • There can be multiple such profiles present in the system created for different users.

If you specify a CA administrator e-mail address to send the certificate request to, then the system composes an e-mail from the certificate request file and forwards it to the specified e-mail address. The e-mail status notification is sent to the administrator.

The certificate request can be sent to the CA through an out-of-band method.

The following options are available to generate the PKCS10 certificate request:

  • certificate-id — Name of the local digital certificate and the public/private key pair. This ensures that the proper key pair is used for the certificate request and ultimately for the local certificate.

    Starting in Junos OS Release 19.1R1, a commit check is added to prevent user from adding ., /, %, and space in a certificate identifier while generating a local or remote certificates or a key pair.

  • subject — Distinguished name format that contains the common name, department, company name, state, and country:

    • CN — Common name

    • OU — Department

    • O — Company name

    • L — Locality

    • ST — State

    • C — Country

    • CN — Phone

    • DC — Domain component

      You are not required to enter all subject name components. Note also that you can enter multiple values of each type.

  • domain-name — FQDN. The FQDN provides the identity of the certificate owner for IKE negotiations and provides an alternative to the subject name.

  • filename (path | terminal) — (Optional) Location where the certificate request should be placed, or the login terminal.

  • ip-address — (Optional) IP address of the device.

  • email — (Optional) E-mail address of the CA administrator.

    You must use a domain-name, an ip-address, or an e-mail address.

The generated certificate request is stored in a specified file location. A local copy of the certificate request is saved in the local certificate storage. If the administrator reissues this command, the certificate request is generated again.

The PKCS10 certificate request is stored in a specified file and location, from which you can download it and send it to the CA for enrollment. If you have not specified the filename or location, you can get PKCS10 certificate request details by using the show security pki certificate-request certificate-id <id-name> command in the CLI. You can copy the command output and paste it into a Web front end for the CA server or into an e-mail.

The PKCS10 certificate request is generated and stored on the system as a pending certificate or certificate request. An e-mail notification is sent to the administrator of the CA (in this example, certadmin@example.com).

A unique identity called certificate-ID is used to name the generated key pair. This ID is also used in certificate enrollment and request commands to get the right key pair. The generated key pair is saved in the certificate store in a file with the same name as the certificate-ID. The file size can be 1024 or 2048 bits.

A default (fallback) profile can be created if intermediate CAs are not preinstalled in the device. The default profile values are used in the absence of a specifically configured CA profile.

In the case of a CDP, the following order is followed:

  • Per CA profile

  • CDP embedded in CA certificate

  • Default CA profile

We recommend using a specific CA profile instead of a default profile.

The administrator submits the certificate request to the CA. The CA administrator verifies the certificate request and generates a new certificate for the device. The administrator for the Juniper Networks device retrieves it, along with the CA certificate and CRL.

The process of retrieving the CA certificate, the device’s new local certificate, and the CRL from the CA depends on the CA configuration and software vendor in use.

Junos OS supports the following CA vendors:

  • Entrust

  • Verisign

  • Microsoft

Although other CA software services such as OpenSSL can be used to generate certificates, these certificates are not verified by Junos OS.

Configuration

PKI Basic Configuration

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

To configure PKI:

  1. Configure an IP address and protocol family on the Gigabit Ethernet interfaces.

  2. Configure a default route to the Internet next hop.

  3. Set the system time and date.

    After the configuration is committed, verify the clock settings using the show system uptime command.

  4. Set the NTP server address.

  5. Set the DNS configuration.

Configuring a CA Profile

Step-by-Step Procedure

  1. Create a trusted CA profile.

  2. Create a revocation check to specify a method for checking certificate revocation.

    Set the refresh interval, in hours, to specify the frequency in which to update the CRL. The default values are next-update time in CRL, or 1 week, if no next-update time is specified.

    In the revocation-check configuration statement, you can use the disable option to disable the revocation check or select the crl option to configure the CRL attributes. You can select the disable on-download-failure option to allow the sessions matching the CA profile, when CRL download failed for a CA profile. The sessions will be allowed only if no old CRL is present in the same CA profile.

  3. Specify the location (URL) to retrieve the CRL (HTTP or LDAP). By default, the URL is empty and uses CDP information embedded in the CA certificate.

    Currently you can configure only one URL. Support for backup URL configuration is not available.

  4. Specify an e-mail address to send the certificate request directly to a CA administrator.

  5. Commit the configuration:

Generating a Public-Private Key Pair

Step-by-Step Procedure

When the CA profile is configured, the next step is to generate a key pair on the Juniper Networks device. To generate the private and public key pair:

  1. Create a certificate key pair.

Results

After the public-private key pair is generated, the Juniper Networks device displays the following:

Enrolling a Local Certificate

Step-by-Step Procedure

  1. Generate a local digital certificate request in the PKCS-10 format. See request security pki generate-certificate-request.

    In the sample of the PKCS10 certificate, the request starts with and includes the BEGIN CERTIFICATE REQUEST line and ends with and includes the END CERTIFICATE REQUEST line. This portion can be copied and pasted to your CA for enrollment. Optionally, you can also offload the ms-cert-req file and send that to your CA.

  2. Submit the certificate request to the CA, and retrieve the certificate.

Loading CA and Local Certificates

Step-by-Step Procedure

  1. Load the local certificate, CA certificate, and CRL.

    You can verify that all files have been uploaded by using the command file list.

  2. Load the certificate into local storage from the specified external file.

    You must also specify the certificate ID to keep the proper linkage with the private or public key pair. This step loads the certificate into the RAM cache storage of the PKI module, checks the associated private key, and verifies the signing operation.

  3. Load the CA certificate from the specified external file.

    You must specify the CA profile to associate the CA certificate to the configured profile.

  4. Load the CRL into the local storage.

    The maximum size of the CRL is 5 MB. You must specify the associated CA profile in the command.

Results

Verify that all local certificates are loaded.

You can display the individual certificate details by specifying certificate-ID in the command line.

Verify all CA certificates or the CA certificates of an individual CA profile (specified).

Verify all loaded CRLs or the CRLs of the specified individual CA profile.

Verify the certificate path for the local certificate and the CA certificate.

Configuring the IPsec VPN with the Certificates

Step-by-Step Procedure

To configure the IPsec VPN with the certificate, refer to the network diagram shown in Figure 1

  1. Configure security zones and assign interfaces to the zones.

    In this example packets are incoming on ge-0/0/0, and the ingress zone is the trust zone.

  2. Configure host-inbound services for each zone.

    Host-inbound services are for traffic destined for the Juniper Networks device. These settings include but are not limited to the FTP, HTTP, HTTPS, IKE, ping, rlogin, RSH, SNMP, SSH, Telnet, TFTP, and traceroute.

  3. Configure the address book entries for each zone.

  4. Configure the IKE (Phase 1) proposal to use RSA encryption.

  5. Configure an IKE policy.

    The phase 1 exchange can take place in either main mode or aggressive mode.

  6. Configure an IKE gateway.

    In this example, the peer is identified by an FQDN (hostname). Therefore the gateway IKE ID should be the remote peer domain name. You must specify the correct external interface or peer ID to properly identify the IKE gateway during Phase 1 setup.

  7. Configure the IPsec policy.

    This example uses the Standard proposal set, which includes esp-group2-3des-sha1 and esp-group2- aes128-sha1 proposals. However, a unique proposal can be created and then specified in the IPsec policy if needed.

  8. Configure the IPsec VPN with an IKE gateway and IPsec policy.

    In this example, the ike-vpn VPN name must be referenced in the tunnel policy to create a security association. Additionally, if required, an idle time and a proxy ID can be specified if they are different from the tunnel policy addresses.

  9. Configure bidirectional tunnel policies for VPN traffic.

    In this example, traffic from the host LAN to the remote office LAN requires a from-zone trust to-zone untrust tunnel policy. However, if a session needs to originate from the remote LAN to the host LAN, then a tunnel policy in the opposite direction from from-zone untrust to-zone trust is also required. When you specify the policy in the opposite direction as the pair-policy, the VPN becomes bidirectional. Note that in addition to the permit action, you also need to specify the IPsec profile to be used. Note that for tunnel policies, the action is always permit. In fact, if you are configuring a policy with the deny action, you will not see an option for specifying the tunnel.

  10. Configure a source NAT rule and a security policy for Internet traffic.

    The device uses the specified source-nat interface, and translates the source IP address and port for outgoing traffic, using the IP address of the egress interface as the source IP address and a random higher port for the source port. If required, more granular policies can be created to permit or deny certain traffic.

  11. Move the tunnel policy above the any-permit policy.

    The security policy should be below the tunnel policy in the hierarchy because the policy list is read from top to bottom. If this policy were above the tunnel policy, then the traffic would always match this policy and would not continue to the next policy. Thus no user traffic would be encrypted.

  12. Configure the tcp-mss setting for TCP traffic across the tunnel.

    TCP-MSS is negotiated as part of the TCP 3-way handshake. It limits the maximum size of a TCP segment to accommodate the MTU limits on a network. This is very important for VPN traffic because the IPsec encapsulation overhead along with the IP and frame overhead can cause the resulting ESP packet to exceed the MTU of the physical interface, causing fragmentation. Because fragmentation increases the bandwidth and device resources usage, and in general it should be avoided.

    The recommended value to use for tcp-mss is 1350 for most Ethernet-based networks with an MTU of 1500 or higher. This value might need to be altered if any device in the path has a lower value of MTU or if there is any added overhead such as PPP, Frame Relay, and so on. As a general rule, you might need to experiment with different tcp-mss values to obtain optimal performance.

Verification

Confirm that the configuration is working properly.

Confirming IKE Phase 1 Status

Purpose

Confirm the VPN status by checking any IKE Phase 1 security associations status.

PKI related to IPsec tunnels is formed during Phase 1 setup. Completion of Phase 1 indicates that PKI was successful.

Action

From operational mode, enter the show security ike security-associations command.

Meaning

The output indicates that:

  • The remote peer is 10.2.2.2 and the status is UP, which means the successful association of Phase 1 establishment.

  • The remote peer IKE ID, IKE policy, and external interfaces are all correct.

  • Index 20 is a unique value for each IKE security association. You can use this output details to get further details on each security association. See Getting Details on Individual Security Associations.

Incorrect output would indicate that:

  • The remote peer status is Down.

  • There are no IKE security associations .

  • There are IKE policy parameters, such as the wrong mode type (Aggr or Main), PKI issues, or Phase 1 proposals (all must match on both peers). For more information, see Troubleshooting IKE, PKI, and IPsec Issues.

  • External interface is invalid for receiving the IKE packets. Check the configurations for PKI-related issues, check the key management daemon (kmd) log for any other errors, or run trace options to find the mismatch. For more information, see Troubleshooting IKE, PKI, and IPsec Issues.

Getting Details on Individual Security Associations

Purpose

Get details on individual IKE.

Action

From operational mode, enter the show security ike security-associations index 20 detail command.

Meaning

The output displays the details of the individual IKE SAs such as role (initiator or responder), status, exchange type, authentication method, encryption algorithms, traffic statistics, Phase 2 negotiation status, and so on.

You can use the output data to:

  • Know the role of the IKE SA. Troubleshooting is easier when the peer has the responder role.

  • Get the traffic statistics to verify the traffic flow in both directions.

  • Get the number of IPsec security associations created or in progress.

  • Get the status of any completed Phase 2 negotiations.

Confirming IPsec Phase 2 Status

Purpose

View IPsec (Phase 2) security associations.

When IKE Phase 1 is confirmed, view the IPsec (Phase 2) security associations.

Action

From operational mode, enter the show security ipsec security-associations command.

Meaning

The output indicates that:

  • There is a configured IPsec SA pair available . The port number 500 indicates that a standard IKE port is used. Otherwise, it is Network Address Translation-Traversal (NAT-T), 4500, or random high port.

  • The security parameter index (SPI) is used for both directions. The lifetime or usage limits of the SA is expressed either in seconds or in kilobytes. In the output, 1676/ unlim indicates Phase 2 lifetime is set to expire in 1676 seconds and there is no specified lifetime size.

  • The ID number shows the unique index value for each IPsec SA.

  • A hyphen (-) in the Mon column indicates that VPN monitoring is not enabled for this SA.

  • The virtual system (vsys) is zero, which is the default value.

Phase 2 lifetime can be different from the Phase 1 lifetime because Phase 2 is not dependent on Phase 1 after the VPN is up.

Displaying IPsec Security Association Details

Purpose

Display the individual IPsec SA details identified by the index number.

Action

From operational mode, enter the show security ipsec security-associations index 2 detail command.

Meaning

The output displays the local Identity and the remote Identity.

Note that a proxy ID mismatch can cause Phase 2 completion to fail. The proxy ID is derived from the tunnel policy (for policy-based VPNs). The local address and remote address are derived from the address book entries, and the service is derived from the application configured for the policy.

If Phase 2 fails due to a proxy ID mismatch, verify which address book entries are configured in the policy and ensure that the correct addresses are sent. Also ensure that the ports are matching. Double-check the service to ensure that the ports match for the remote and local servers.

If multiple objects are configured in a tunnel policy for source address, destination address, or application, then the resulting proxy ID for that parameter is changed to zeroes.

For example, assume the following scenario for a tunnel policy:

  • Local addresses of 192.168.10.0/24 and 10.10.20.0/24

  • Remote address of 192.168.168.0/24

  • Application as junos-http

The resulting proxy ID is local 0.0.0.0/0, remote 192.168.168.0/24, service 80.

The resulting proxy IDs can affect the interoperability if the remote peer is not configured for the second subnet. Also, if you are employing a third-party vendor’s application, you might have to manually enter the proxy ID to match.

If IPsec fails to complete, then check the kmd log or use the set traceoptions command. For more information, see Troubleshooting IKE, PKI, and IPsec Issues.

Checking IPsec SA Statistics

Purpose

Check statistics and errors for an IPsec SA.

For troubleshooting purpose, check the Encapsulating Security Payload/Authentication Header (ESP/AH) counters for any errors with a particular IPsec SA.

Action

From operational mode, enter the show security ipsec statistics index 2 command.

Meaning

An error value of zero in the output indicates a normal condition.

We recommend running this command multiple times to observe any packet loss issues across a VPN. Output from this command also displays the statistics for encrypted and decrypted packet counters, error counters, and so on.

You must enable security flow trace options to investigate which ESP packets are experiencing errors and why. For more information, see Troubleshooting IKE, PKI, and IPsec Issues.

Testing Traffic Flow Across the VPN

Purpose

Test traffic flow across the VPN after Phase 1 and Phase 2 have completed successfully. You can test traffic flow by using the ping command. You can ping from local host to remote host. You can also initiate pings from the Juniper Networks device itself.

This example shows how to initiate a ping request from the Juniper Networks device to the remote host. Note that when pings are initiated from the Juniper Networks device, the source interface must be specified to ensure that the correct route lookup takes place and the appropriate zones are referenced in the policy lookup.

In this example, the ge-0/0/0.0 interface resides in the same security zone as the local host and must be specified in the ping request so that the policy lookup can be from zone trust to zone untrust.

Action

From operational mode, enter the ping 192.168.168.10 interface ge-0/0/0 count 5 command.

Confirming the Connectivity

Purpose

Confirm the connectivity between a remote host and a local host.

Action

From operational mode, enter the ping 192.168.10.10 from ethernet0/6 command.

Meaning

You can confirm end-to-end connectivity by using the ping command from the remote host to the local host. In this example, the command is initiated from the SSG5 device.

Failed end-to-end connectivity can indicate an issue with routing, policy, end host, or encryption/decryption of the ESP packets. To verify the exact causes of the failure:

  • Check IPsec statistics for details on errors as described in Checking IPsec SA Statistics.

  • Confirm end host connectivity by using the ping command from a host on the same subnet as the end host. If the end host is reachable by other hosts, then you can assume that the issue is not with the end host.

  • Enable security flow trace options for troubleshooting the routing-related and policy-related issues.

Troubleshooting IKE, PKI, and IPsec Issues

Troubleshoot IKE, PKI, and IPsec issues.

Basic Troubleshooting Steps

Problem

The basic troubleshooting steps are as follows:

  1. Identifying and isolating the problem.

  2. Debugging the problem.

The common approach of starting troubleshooting is with the lowest layer of the OSI layers and working your way up the OSI stack to confirm the layer in which the failure occurs.

Solution

Basic steps for troubleshooting IKE, PKI, and IPsec are as follows:

  • Confirm the physical connectivity of the Internet link at the physical and data link levels.

  • Confirm that the Juniper Networks device has connectivity to the Internet next hop and connectivity to the remote IKE peer.

  • Confirm IKE Phase 1 completion.

  • Confirm IKE Phase 2 completion if IKE Phase 1 completion is successful.

  • Confirm the traffic flow across the VPN (if the VPN is up and active).

Junos OS includes the trace options feature. Using this feature, you can enable a trace option flag to write the data from the trace option to a log file, which can be predetermined or manually configured and stored in flash memory. These trace logs can be retained even after a system reboot. Check the available flash storage before implementing trace options.

You can enable the trace options feature in configuration mode and commit the configuration to use the trace options feature. Similarly to disable trace options, you must deactivate trace options in configuration mode and commit the configuration.

Checking the Free Disk Space on Your Device

Problem

Check the statistics on the free disk space in your device file systems.

Solution

From operational mode, enter the show system storage command.

The /dev/ad0s1a represents the onboard flash memory and is currently at 35 percent capacity.

Checking the Log Files to Verify Different Scenarios and Uploading Log Files to an FTP

Problem

View the log files to check security IKE debug messages, security flow debugs, and the state of logging to the syslog.

Solution

From operational mode, enter the show log kmd, show log pkid, show log security-trace, and show log messages commands.

You can view a list of all logs in the /var/log directory by using the show log command.

Log files can also be uploaded to an FTP server by using the file copy command.

Enabling IKE Trace Options to View Messages on IKE

Problem

To view success or failure messages for IKE or IPsec, you can view the kmd log by using the show log kmd command. Because the kmd log displays some general messages, it can be useful to obtain additional details by enabling IKE and PKI trace options.

Generally, it is best practice to troubleshoot the peer that has the responder role. You must obtain the trace output from the initiator and responder to understand the cause of a failure.

Configure IKE tracing options.

Solution

If you do not specify file names for the <filename> field, then all IKE trace options are written to the kmd log.

You must specify at least one flag option to write trace data to the log. For example:

  • file size — Maximum size of each trace file, in bytes. For example, 1 million (1,000,000 ) can generate a maximum file size of 1 MB.

  • files — Maximum number of trace files to be generated and stored in a flash memory device.

You must commit your configuration to start the trace.

Enabling PKI Trace Options to View Messages on IPsec

Problem

Enable PKI trace options to identify whether an IKE failure is related to the certificate or to a non-PKI issue.

Solution

Setting up IKE and PKI Trace Options to Troubleshoot IKE Setup Issues with Certificates

Problem

Configure the recommended settings for IKE and PKI trace options.

The IKE and PKI trace options use the same parameters, but the default filename for all PKI-related traces is found in the pkid log.

Solution

Analyzing the Phase 1 Success Message

Problem

Understand the output of the show log kmd command when the IKE Phase 1 and Phase 2 conditions are successful.

Solution

The sample output indicates:

  • 10.1.1.2—Local address.

  • ssg5.example.net —Remote peer (hostname with FQDN).

  • udp: 500—NAT-T was not negotiated.

  • Phase 1 [responder] done—Phase 1 status, along with the role (initiator or responder).

  • Phase 2 [responder] done—Phase 1 status, along with the proxy ID information.

    You can also confirm the IPsec SA status by using the verification commands mentioned in Confirming IKE Phase 1 Status.

Analyzing the Phase 1 Failure Message (Proposal Mismatch)

Problem

Understanding the output of the show log kmd command, where the IKE Phase 1 condition is a failure, helps in determining the reason for the VPN not establishing Phase 1.

Solution

The sample output indicates:

  • 10.1.1.2—Local address.

  • ssg5.example.net —Remote peer (hostname with FQDN).

  • udp: 500—NAT-T was not negotiated.

  • Phase-1 [responder] failed with error (No proposal chosen)—Phase 1 failure because of proposal mismatch.

To resolve this issue, ensure that the parameters for the IKE gateway Phase 1 proposals on both the responder and the initiator match. Also confirm that a tunnel policy exists for the VPN.

Analyzing the Phase 1 Failure Message (Authentication Failure)

Problem

Understand the output of the show log kmd command when the IKE Phase 1 condition is a failure. This helps in determining the reason for the VPN not establishing Phase 1.

Solution

The sample output indicates:

  • 10.1.1.2—Local address.

  • 10.2.2.2—Remote peer

  • Phase 1 [responder] failed with error (Authentication failed)—Phase 1 failure due to the responder not recognizing the incoming request originating from a valid gateway peer. In the case of IKE with PKI certificates, this failure typically indicates that an incorrect IKE ID type was specified or entered.

To resolve this issue, confirm that the correct peer IKE ID type is specified on the local peer based on the following:

  • How the remote peer certificate was generated

  • Subject Alternative Name or DN information in the received remote peer certificate

Analyzing the Phase 1 Failure Message (Timeout Error)

Problem

Understand the output of the show log kmd command when the IKE Phase 1 condition is a failure.

Solution

The sample output indicates:

  • 10.1.1.2—Llocal address.

  • 10.2.2.2—Remote peer.

  • Phase 1 [responder] failed with error(Timeout)—Phase 1 failure.

    This error indicates that either the IKE packet is lost enroute to the remote peer or there is a delay or no response from the remote peer.

Because this timeout error is the result of waiting on a response from the PKI daemon, you must review the PKI trace options output to see whether there is a problem with PKI.

Analyzing the Phase 2 Failure Message

Problem

Understand the output of the show log kmd command when the IKE Phase 2 condition is a failure.

Solution

The sample output indicates:

  • 10.1.1.2—Local address.

  • ssg5.example.net —Remote peer (IKE ID type hostname with FQDN).

  • Phase 1 [responder] done—Phase 1 success.

  • Failed to match the peer proxy ids—The Incorrect proxy IDs are received. In the previous sample, the two proxy IDs received are 192.168.168.0/24 (remote) and 10.10.20.0/24 (local) (for service=any). Based on the configuration given in this example, the expected local address is 192.168.10.0/24. This shows that there is a mismatch of configurations on the local peer, resulting in the failure of proxy ID match.

    To resolve this issue, correct the address book entry or configure the proxy ID on either peer so that it matches the other peer.

    The output also indicates the reason for failure is No proposal chosen. However in this case you also see the message Failed to match the peer proxy ids.

Analyzing the Phase 2 Failure Message

Problem

Understand the output of the show log kmd command when the IKE Phase 2 condition is a failure.

Solution

The sample output indicates:

  • 10.1.1.2 —Local address.

  • fqdn(udp:500,[0..15]=ssg5.example.net—Remote peer.

  • Phase 1 [responder] done—Phase 1 success.

  • Error = No proposal chosen—No proposal was chosen during Phase 2. This issue is due to proposal mismatch between the two peers.

    To resolve this issue, confirm that the Phase 2 proposals match on both peers.

Troubleshooting Common Problems Related to IKE and PKI

Problem

Troubleshoot common problems related to IKE and PKI.

Enabling the trace options feature helps you to gather more information on the debugging issues than is obtainable from the normal log entries. You can use the trace options log to understand the reasons for IKE or PKI failures.

Solution

Methods for troubleshooting the IKE -and-PKI-related issues:

  • Ensure that the clock, date, time zone, and daylight savings settings are correct. Use NTP to keep the clock accurate.

  • Ensure that you use a two-letter country code in the "C=" (country) field of the DN.

    For example: use “US” and not “USA” or “United States.” Some CAs require that the country field of the DN be populated, allowing you to enter the country code value only with a two-letter value.

  • Ensure that if a peer certificate is using multiple OU=or CN= fields, you are using the distinguished name with container method (the sequence must be maintained and is case- sensitive).

  • If the certificate is not valid yet, check the system clock and, if required, adjust the system time zone or just add a day in the clock for a quick test.

  • Ensure that a matching IKE ID type and value are configured.

  • PKI can fail due to a revocation check failure. To confirm this, temporarily disable revocation checking and see whether IKE Phase 1 is able to complete.

    To disable revocation checking, use the following command in configure mode:

    set security pki ca-profile <ca-profile> revocation-check disable