12-Security Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C MSR610[810][830][1000S][2600][3600] Routers Configuration Guides(V7)-R6749-6W10312-Security Configuration Guide
15-SSL configuration
Title Size Download
15-SSL configuration 224.74 KB

Configuring SSL

About SSL

Secure Sockets Layer (SSL) is a cryptographic protocol that provides communication security for TCP-based application layer protocols such as HTTP. SSL has been widely used in applications such as e-business and online banking to provide secure data transmission over the Internet.

SSL security services

SSL provides the following security services:

·     Privacy—SSL uses a symmetric encryption algorithm to encrypt data. It uses the asymmetric key algorithm of RSA to encrypt the key used by the symmetric encryption algorithm. For more information about RSA, see "Managing public keys."

·     Authentication—SSL uses certificate-based digital signatures to authenticate the SSL server and client. The SSL server and client obtain digital certificates through PKI. For more information about PKI and digital certificates, see "Configuring PKI."

·     Integrity—SSL uses the message authentication code (MAC) to verify message integrity. It uses a MAC algorithm and a key to transform a message of any length to a fixed-length message. Any change to the original message will result in a change to the calculated fixed-length message. As shown in Figure 1, the message integrity verification process is as follows:

a.     The sender uses a MAC algorithm and a key to calculate a MAC value for a message. Then, it appends the MAC value to the message and sends the message to the receiver.

b.     The receiver uses the same key and MAC algorithm to calculate a MAC value for the received message, and compares it with the MAC value appended to the message.

c.     If the two MAC values match, the receiver considers the message intact. Otherwise, the receiver considers that the message was tampered with and it discards the message.

Figure 1 MAC algorithm diagram

 

SSL protocol stack

The SSL protocol stack includes the following protocols:

·     SSL record protocol at the lower layer.

·     SSL handshake protocol, SSL change cipher spec protocol, and SSL alert protocol at the upper layer.

Figure 2 SSL protocol stack

 

The following describes the major functions of SSL protocols:

·     SSL record protocol—Fragments data received from the upper layer, computes and adds MAC to the data, and encrypts the data.

·     SSL handshake protocol—Negotiates the cipher suite used for secure communication, authenticates the server and client, and securely exchanges the keys between the server and client. The cipher suite that needs to be negotiated includes the symmetric encryption algorithm, key exchange algorithm, and MAC algorithm.

·     SSL change cipher spec protocol—Notifies the receiver that subsequent packets are to be protected based on the negotiated cipher suite and key.

·     SSL alert protocol—Sends alert messages to the receiving party. An alert message contains the alert severity level and a description.

SSL protocol versions

SSL protocol versions include SSL 2.0, SSL 3.0, TLS 1.0 (or SSL 3.1), TLS 1.1, TLS 1.2, and TLS 1.3. Because SSL 3.0 is known to be insecure, you can disable SSL 3.0 for the SSL server to ensure security.

FIPS compliance

The device supports the FIPS mode that complies with NIST FIPS 140-2 requirements. Support for features, commands, and parameters might differ in FIPS mode (see "Configuring FIPS") and non-FIPS mode.

Restrictions and guidelines: SSL configuration

When the device operates as an SSL server, it can communicate with clients running SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, or TLS 1.3. It also can identify clients compatible with SSL 2.0, SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, and TLS 1.3. When the server receives an SSL message from such a client, it notifies the client to use SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, or TLS 1.3 for communication.

SSL tasks at a glance

To configure SSL, perform the following tasks:

1.     Configure an SSL server:

¡     Configuring an SSL server policy

¡     (Optional.) Disabling SSL protocol versions for the SSL server

¡     (Optional.) Disabling SSL session renegotiation

2.     Configure an SSL client:

¡     Configuring an SSL client policy

3.     Enabling the server-preferred order during cipher suite negotiation

4.     Specifying a security enhanced level

Configuring an SSL server policy

About this task

An SSL server policy is a set of SSL parameters used by the device when the device acts as the SSL server. An SSL server policy takes effect only after it is associated with an application such as HTTPS.

 (such as SSL VPN) might require using two digital certificates on the server. To meet the requirement, you can use this command to specify two PKI domains in the SSL server policy at a time.

Procedure

1.     Enter system view.

system-view

2.     Create an SSL server policy and enter its view.

ssl server-policy policy-name

3.     Specify a PKI domain for the SSL server policy.

pki-domain domain-name&<1-2>

By default, no PKI domain is specified for an SSL server policy.

If SSL server authentication is required, you must specify a PKI domain and request a local certificate for the SSL server in the domain.

For information about configuring a PKI domain, see "Configuring PKI."

4.     Specify the cipher suites that the SSL server policy supports.

In non-FIPS mode:

ciphersuite { dhe_rsa_aes_128_cbc_sha | dhe_rsa_aes_128_cbc_sha256 | dhe_rsa_aes_256_cbc_sha | dhe_rsa_aes_256_cbc_sha256 | ecc_sm2_sm1_sm3 | ecc_sm2_sm4_sm3 | ecdhe_ecdsa_aes_128_cbc_sha256 | ecdhe_ecdsa_aes_128_gcm_sha256 | ecdhe_ecdsa_aes_256_cbc_sha384 | ecdhe_ecdsa_aes_256_gcm_sha384 | ecdhe_rsa_aes_128_cbc_sha256 | ecdhe_rsa_aes_128_gcm_sha256 | ecdhe_rsa_aes_256_cbc_sha384 | ecdhe_rsa_aes_256_gcm_sha384 | ecdhe_sm2_sm1_sm3 | ecdhe_sm2_sm4_sm3 | rsa_3des_ede_cbc_sha | rsa_aes_128_cbc_sha | rsa_aes_128_cbc_sha256 | rsa_aes_128_gcm_sha256 | rsa_aes_256_cbc_sha | rsa_aes_256_cbc_sha256 | rsa_aes_256_gcm_sha384 | rsa_des_cbc_sha | rsa_rc4_128_md5 | rsa_rc4_128_sha | rsa_sm1_sha | rsa_sm1_sm3 | rsa_sm4_sha | rsa_sm4_sm3 | tls_aes_128_ccm_sha256 | tls_aes_128_ccm_8_sha256 | tls_aes_128_gcm_sha256 | tls_aes_256_gcm_sha384 | tls_chacha20_poly1305_sha256  }

Support for the ecc_sm2_sm1_sm3, ecc_sm2_sm4_sm3, ecdhe_sm2_sm1_sm3, ecdhe_sm2_sm4_sm3, rsa_sm1_sha, rsa_sm1_sm3, rsa_sm4_sha, and rsa_sm4_sm3 depends on the device model. For more information, see SSL commands in Security Command Reference.

In FIPS mode:

ciphersuite { ecdhe_ecdsa_aes_128_cbc_sha256 | ecdhe_ecdsa_aes_256_cbc_sha384 | ecdhe_ecdsa_aes_128_gcm_sha256 | ecdhe_ecdsa_aes_256_gcm_sha384 | ecdhe_rsa_aes_128_cbc_sha256 | ecdhe_rsa_aes_128_gcm_sha256 | ecdhe_rsa_aes_256_cbc_sha384 | ecdhe_rsa_aes_256_gcm_sha384 | rsa_aes_128_cbc_sha | rsa_aes_128_cbc_sha256 | rsa_aes_128_gcm_sha256 |  rsa_aes_256_cbc_sha | rsa_aes_256_cbc_sha256 | rsa_aes_256_gcm_sha384 }

The default varies by device model. For more information, see SSL commands in Security Command Reference.

5.     (Optional.) Set the maximum number of sessions that the SSL server can cache and the session cache timeout time.

session { cachesize size | timeout time } *

By default, the SSL server can cache a maximum of 500 sessions, and the session cache timeout time is 3600 seconds.

6.     Enable mandatory or optional SSL client authentication.

client-verify { enable | optional }

By default, SSL client authentication is disabled. The SSL server does not perform digital certificate-based authentication on SSL clients.

When authenticating a client by using the digital certificate, the SSL server verifies the certificate chain presented by the client. It also verifies that the certificates in the certificate chain (except the root CA certificate) are not revoked.

7.     (Optional.) Enable the SSL server to send the complete certificate chain to the client during SSL negotiation.

certificate-chain-sending enable

By default, the SSL server sends the server certificate rather than the complete certificate chain to the client during negotiation.

Configuring an SSL client policy

About this task

An SSL client policy is a set of SSL parameters used by the device when the device acts as the SSL client. The SSL client uses the settings in the client policy to establish a connection to the server. An SSL client policy takes effect only after it is associated with an application such as DDNS. For information about DDNS, see the DNS configuration in Layer 3—IP Services Configuration Guide.

Restrictions and guidelines

As a best practice to enhance system security, do not specify SSL 3.0 for the SSL client policy.

Procedure

1.     Enter system view.

system-view

2.     Create an SSL client policy and enter its view.

ssl client-policy policy-name

3.     Specify a PKI domain for the SSL client policy.

pki-domain domain-name

By default, no PKI domain is specified for an SSL client policy.

If SSL client authentication is required, you must specify a PKI domain and request a local certificate for the SSL client in the PKI domain.

For information about configuring a PKI domain, see "Configuring PKI."

4.     Specify the preferred cipher suite for the SSL client policy.

In non-FIPS mode:

prefer-cipher { dhe_rsa_aes_128_cbc_sha | dhe_rsa_aes_128_cbc_sha256 | dhe_rsa_aes_256_cbc_sha | dhe_rsa_aes_256_cbc_sha256 | ecc_sm2_sm1_sm3 | ecc_sm2_sm4_sm3 | ecdhe_ecdsa_aes_128_cbc_sha256 | ecdhe_ecdsa_aes_128_gcm_sha256 | ecdhe_ecdsa_aes_256_cbc_sha384 | ecdhe_ecdsa_aes_256_gcm_sha384 | ecdhe_rsa_aes_128_cbc_sha256 | ecdhe_rsa_aes_128_gcm_sha256 | ecdhe_rsa_aes_256_cbc_sha384 | ecdhe_rsa_aes_256_gcm_sha384 | ecdhe_sm2_sm1_sm3 | ecdhe_sm2_sm4_sm3 | rsa_3des_ede_cbc_sha | rsa_aes_128_cbc_sha | rsa_aes_128_cbc_sha256 | rsa_aes_128_gcm_sha256 | rsa_aes_256_cbc_sha | rsa_aes_256_cbc_sha256 | rsa_aes_256_gcm_sha384 | rsa_des_cbc_sha | rsa_rc4_128_md5 | rsa_rc4_128_sha | rsa_sm1_sha | rsa_sm1_sm3 | rsa_sm4_sha | rsa_sm4_sm3 | tls_aes_128_ccm_sha256 | tls_aes_128_ccm_8_sha256 | tls_aes_128_gcm_sha256 | tls_aes_256_gcm_sha384 | tls_chacha20_poly1305_sha256 }

Support for the ecc_sm2_sm1_sm3, ecc_sm2_sm4_sm3, ecdhe_sm2_sm1_sm3, ecdhe_sm2_sm4_sm3, rsa_sm1_sha, rsa_sm1_sm3, rsa_sm4_sha, and rsa_sm4_sm3 keywords depend on the device model. For more information, see SSL commands in Security Command Reference.

In FIPS mode:

prefer-cipher { ecdhe_ecdsa_aes_128_cbc_sha256 | ecdhe_ecdsa_aes_128_gcm_sha256 | ecdhe_ecdsa_aes_256_cbc_sha384 | ecdhe_ecdsa_aes_256_gcm_sha384 | ecdhe_rsa_aes_128_cbc_sha256 | ecdhe_rsa_aes_128_gcm_sha256 | ecdhe_rsa_aes_256_cbc_sha384 | ecdhe_rsa_aes_256_gcm_sha384 | rsa_aes_128_cbc_sha | rsa_aes_128_cbc_sha256 | rsa_aes_128_gcm_sha256 | rsa_aes_256_cbc_sha | rsa_aes_256_cbc_sha256 | rsa_aes_256_gcm_sha384 }

The default varies by device model. For more information, see SSL commands in Security Command Reference.

5.     Specify the SSL protocol version for the SSL client policy.

In non-FIPS mode:

version { ssl3.0 | tls1.0 | tls1.1 | tls1.2 | tls1.3 }

In FIPS mode:

version { tls1.0 | tls1.1 | tls1.2 }

The default varies by device model. For more information, see SSL commands in Security Command Reference.

6.     Enable the SSL client to authenticate servers through digital certificates.

server-verify enable

By default, SSL server authentication is enabled.

Disabling SSL protocol versions for the SSL server

About this task

To enhance security, you can disable the SSL server from using specific SSL protocol versions for session negotiation.

You can disable an SSL protocol version for the SSL server in system view or in SSL server policy view. The SSL server can use an SSL protocol version for session negotiation only when the status of the SSL protocol version in the SSL server policy is Enabled. The status of an SSL protocol version in an SSL server policy is determined in the following sequence:

1.     Configuration of the version disable command in SSL server policy view.

2.     Configuration of the ssl version disable command in system view.

3.     Default setting (Enabled).

Make sure the SSL server is allowed to use a minimum of one SSL protocol version for session negotiation.

Restrictions and guidelines

Disabling an SSL protocol version does not affect the availability of earlier SSL protocol versions. For example, if you execute the ssl version tls1.1 disable command, TLS 1.1 is disabled but TLS 1.0 is still available for the SSL server.

Procedure

1.     Enter system view.

system-view

2.     Disable SSL protocol versions for the SSL server in system view.

In non-FIPS mode:

ssl version { ssl3.0 | tls1.0 | tls1.1 | tls1.2 | tls1.3 } * disable

The default varies by device model. For more information, see SSL commands in Security Command Reference.

In FIPS mode:

ssl version { tls1.0 | tls1.1 | tls1.2 } * disable

The default varies by device model. For more information, see SSL commands in Security Command Reference.

3.     Enter SSL server policy view.

ssl server-policy policy-name

4.     Disable SSL protocol versions in the SSL server policy.

In non-FIPS mode:

version { ssl3.0 | tls1.0 | tls1.1 | tls1.2 | tls1.3 } * disable

In FIPS mode:

version { tls1.0 | tls1.1 | tls1.2 } * disable

By default, an SSL protocol version is enabled in an SSL sever policy unless it is explicitly disabled in system view by using the ssl version disable command.

Disabling SSL session renegotiation

About this task

The SSL session renegotiation feature enables the SSL client and server to reuse a previously negotiated SSL session for an abbreviated handshake.

Disabling session renegotiation causes more computational overhead to the system but it can avoid potential risks.

Restrictions and guidelines

Disable SSL session renegotiation only when explicitly required.

Procedure

1.     Enter system view.

system-view

2.     Disable SSL session renegotiation.

ssl renegotiation disable

The default varies by device model. For more information, see SSL commands in Security Command Reference.

Enabling the server-preferred order during cipher suite negotiation

About this task

During SSL connection negotiation, the key exchange algorithm, symmetric encryption algorithm, and MAC algorithm used for message exchange between the SSL server and the SSL client will be determined. By default, the SSL server uses the order of cipher suites presented by the client to negotiate the cipher suite. That is, the SSL server chooses the first cipher suite in the client's list that matches any one of the server's cipher suites. If no match is found, the negotiation fails.

This feature allows you to select the server-preferred order for cipher suite negotiation. That is, the SSL server chooses the first cipher suite in its list that matches any one of the client's cipher suites. If no match is found, the negotiation fails.

The earlier a cipher suite is configured, the higher priority it has during the cipher suite negotiation.

Procedure

1.     Enter system view.

system-view

2.     Enter SSL server policy view.

ssl server-policy policy-name

3.     Enable the server-preferred order for choosing a cipher suite during the cipher suite negotiation between the SSL server and SSL client.

ciphersuite server-preferred enable

By default, the client-preferred order for choosing a cipher suite during the cipher suite negotiation between the SSL server and SSL client.

Specifying a security enhanced level

About this task

The security enhanced level for the device can be 1 and 2. Level 2 indicates a higher security level. If the security enhanced level is set to 2, the following rules apply:

·     SSL client policies and SSL server policies do not support cipher suites that contain DES, 3DES, MD5, RC4, and RC2.

·     SSL client policies and SSL server policies do not support SSL protocol versions lower than TLS 1.1.

·     SSL session renegotiation cannot be enabled.

You can specify a security enhanced level as needed.

Restrictions and guidelines

After you change the security enhanced level, for services associated with SSL policies, such as HTTP and SSL VPN, you must re-enable these services to update the associated policies.

Procedure

1.     Enter system view.

system-view

2.     Specify the security enhanced level for the device.

security-enhanced level level-value

The default setting varies by device model. For more information, see SSL commands in Security Command Reference.

Display and maintenance commands for SSL

Execute display commands in any view.

Task

Command

Display SSL client policy information.

display ssl client-policy [ policy-name ]

Display SSL server policy information.

display ssl server-policy [ policy-name ]

SSL server policy configuration examples

Example: Configuring an SSL server policy

Network configuration

As shown in Figure 3, users need to access and manage the device through the Web page.

To protect the device and prevent data from being eavesdropped or tampered with, configure the device to be accessible through HTTPS only.

In this example, the CA server runs Windows Server and has the SCEP plug-in installed.

To meet the network requirements, perform the following tasks:

·     Configure the device as the HTTPS server and request a server certificate for the device.

·     Request a client certificate for the host so that the device can authenticate the identity of the host.

Figure 3 Network diagram

Procedure

1.     Make sure the device, the host, and the CA server can reach each other. (Details not shown.)

2.     Configure the HTTPS server on the device:

# Create a PKI entity named en. Set the common name and FQDN for the entity.

<Device> system-view

[Device] pki entity en

[Device-pki-entity-en] common-name http-server1

[Device-pki-entity-en] fqdn ssl.security.com

[Device-pki-entity-en] quit

# Create PKI domain 1 and specify CA server as the name of the trusted CA. Set the URL of the registration server to http://10.1.2.2/certsrv/mscep/mscep.dll, the authority for certificate request to RA, and the entity for certificate request to en. Set the URL of the CRL repository to http://10.1.2.2/CertEnroll/caserver.crl.

[Device] pki domain 1

[Device-pki-domain-1] ca identifier CA server

[Device-pki-domain-1] certificate request url http://10.1.2.2/certsrv/mscep/mscep.dll

[Device-pki-domain-1] certificate request from ra

[Device-pki-domain-1] certificate request entity en

[Device-pki-domain-1] crl url http://10.1.2.2/CertEnroll/caserver.crl

# Configure a general-purpose RSA key pair named abc and set the key modulus length to 1024 bits.

[Device-pki-domain-1] public-key rsa general name abc length 1024

[Device-pki-domain-1] quit

# Generate RSA key pair abc.

[Device] public-key local create rsa name abc

The range of public key size is (512 ~ 2048).

If the key modulus is greater than 512,it will take a few minutes.

Press CTRL+C to abort.

Input the modulus length [default = 1024]:

Generating Keys...

..........................++++++

.....................................++++++

Create the key pair successfully.

# Obtain the CA certificate.

[Device] pki retrieve-certificate domain 1 ca

The trusted CA's finger print is:

    MD5  fingerprint:7682 5865 ACC2 7B16 6F52 D60F D998 4484

    SHA1 fingerprint:DF6B C53A E645 5C81 D6FC 09B0 3459 DFD1 94F6 3DDE

Is the finger print correct?(Y/N):y

Retrieved the certificates successfully.

# Request a server certificate for the device.

[Device] pki request-certificate domain 1

Start to request general certificate ...

Certificate requested successfully.

# Create an SSL server policy named myssl.

[Device] ssl server-policy myssl

# Specify PKI domain 1 for the SSL server policy.

[Device-ssl-server-policy-myssl] pki-domain 1

# Enable client authentication.

[Device-ssl-server-policy-myssl] client-verify enable

[Device-ssl-server-policy-myssl] quit

# Configure the HTTPS service to use SSL server policy myssl.

[Device] ip https ssl-server-policy myssl

# Enable the HTTPS service.

[Device] ip https enable

# Create a local user named usera. Set the password to 123456TESTplat&!, service type to https, and user role to network-admin.

[Device] local-user usera

[Device-luser-usera] password simple 123456TESTplat&!

[Device-luser-usera] service-type https

[Device-luser-usera] authorization-attribute user-role network-admin

3.     Request a client certificate for the host:

a.     Launch IE on the host, and then enter http://10.1.2.2/certsrv in the address bar.

b.     Request a client certificate for the host. (Details not shown.)

Verifying the configuration

Perform the following tasks on the host:

1.     Launch IE and enter https://10.1.1.1 in the address bar.

2.     Select the certificate issued by the CA server to the host.

The login page of the device should appear.

3.     Enter username usera and password 123456TESTplat&!.

Verify that now you can log in to the Web interface to access and manage the device.

Example: Configuring an SSL client policy

Network configuration

To meet the requirements for centralized operation and security auditing, device logs must be sent to the log server over TLS to ensure data transmission confidentiality. This solution uses a free-authentication mode. The local and peer do not require certificate authentication and rely only on TLS encryption to ensure transmission security, which reduces authentication management costs.

Figure 4 Network diagram

 

Table 1 Interface label and interface name mappings

Interface label

Interface name

Interface1

GigabitEthernet1/0/1

Restrictions and guidelines

·     Make sure the device and the log server support the same TLS versions and cipher suites to ensure the compatibility for secure connections.

·     Do not configure the listening port number as 514. Port 514 is the standard syslog port for plaintext TCP/UDP and does not support TLS/SSL encryption. If you set the listening port number to 514, the connection uses plaintext data transmission and does not trigger the TLS handshake even when you enable an SSL client policy.

·     Because syslog over TLS negotiates encrypted connections over TCP, the client and server must be configured with the same port settings. In a new server deployment, use the default port 6514 for syslog over TLS as a best practice.

Prerequisites

This configuration example uses Kiwi Syslog Server as the log server. Complete the following tasks:

·     Apply for local certificates

In a TLS connection, the log server acts as the SSL server. Even if the SSL client does not verify the server certificate, the server must still have a valid certificate, which can be self-signed or issued by a private CA, to complete the key exchange. Otherwise, the system cannot establish a secure communication channel. After you apply for a certificate, import it to the personal certificate node of the local computer console that hosts Kiwi Syslog Server.

·     Configure the log server

Configure the server address, log processing actions (such as console display or file writing), log processing frequency, and input protocol on Kiwi Syslog Server. In this example, select Secure TCP as the input protocol, set the protocol version to TLS 1.2, and specify port ID 6514. Then, select the server certificate imported in the previous step.

Procedure

1.     Assign addresses to interfaces.

<Sysname> system-view

[Sysname] sysname Device

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] ip address 2.2.2.10 24

[Device-GigabitEthernet1/0/1] quit

2.     Configure an SSL client policy.

# Create an SSL client policy named myssl.

[Device] ssl client-policy myssl

# Specify the TLS version for the SSL client policy as TLS 1.2.

[Device-ssl-client-policy-myssl] version tls1.2

# Specify the cipher suites supported by the SSL client policy.

[Device-ssl-client-policy-myssl] prefer-cipher ecdhe_ecdsa_aes_128_cbc_sha ecdhe_ecdsa_aes_128_cbc_sha256 ecdhe_ecdsa_aes_128_gcm_sha256 ecdhe_ecdsa_aes_256_gcm_sha384 ecdhe_ecdsa_aes_256_cbc_sha ecdhe_ecdsa_aes_256_cbc_sha384 rsa_aes_256_gcm_sha384 rsa_aes_128_gcm_sha256 rsa_aes_256_cbc_sha

# Disable SSL server authentication. The SSL client does not authenticate the SSL server.

[Device-ssl-client-policy-myssl] undo server-verify enable

[Device-ssl-client-policy-myssl] quit

3.     Configure the information center.

# Enable the information center.

[Device] info-center enable

# Specify the source IP address for logs sent to log hosts as the IP address of GigabitEthernet 1/0/1.

[Device] info-center loghost source GigabitEthernet1/0/1

# Configure the device to output log messages to the log server at 2.2.2.2 by using a TLS TCP connection and port number 6514.

[Device] info-center loghost 2.2.2.2 tcp ssl-client-policy myssl port 6514

Verifying the configuration

You can use a packet capture tool to verify that the TLS connection is established when commands are executed on the device or log messages are generated. Meanwhile, the console also displays the configuration and log information.

 

 

Configuration files

#

 sysname Device

#

interface GigabitEthernet1/0/1

 port link-mode route

 ip address 2.2.2.10 255.255.255.0

#

 info-center loghost source GigabitEthernet1/0/1

 info-center loghost 2.2.2.2 port 6514 tcp ssl-client-policy myssl

#

ssl client-policy myssl

 version tls1.2

 prefer-cipher ecdhe_ecdsa_aes_128_cbc_sha ecdhe_ecdsa_aes_128_cbc_sha256 ecdhe_ecdsa_aes_128_gcm_sha256 ecdhe_ecdsa_aes_256_gcm_sha384 ecdhe_ecdsa_aes_256_cbc_sha ecdhe_ecdsa_aes_256_cbc_sha384 rsa_aes_256_gcm_sha384 rsa_aes_128_gcm_sha256 rsa_aes_256_cbc_sha

undo server-verify enable

#

Example: Configuring the SSL client to authenticate the SSL server based on certificates

Network configuration

To meet the requirements for centralized operation and security auditing, device logs must be sent to the log server over TLS to ensure data transmission confidentiality and integrity. The device uses a digital certificate to verify the log server's identity, preventing man-in-the-middle attacks.

Figure 5 Network diagram

 

Table 2 Interface label and interface name mappings

Interface label

Interface name

Interface1

GigabitEthernet1/0/1

Interface2

GigabitEthernet1/0/2

Restrictions and guidelines

·     Make sure the device and the log server support the same TLS versions and cipher suites to ensure the compatibility for secure connections.

·     Do not configure the listening port number as 514. Port 514 is the standard syslog port for plaintext TCP/UDP and does not support TLS/SSL encryption. If you set the listening port number to 514, the connection uses plaintext data transmission and does not trigger the TLS handshake even when you enable an SSL client policy.

·     Because syslog over TLS negotiates encrypted connections over TCP, the client and server must be configured with the same port settings. In a new server deployment, use the default port 6514 for syslog over TLS as a best practice.

·     Because the device needs to use a digital certificate to authenticate the identity of the log server, make sure the certificate for the log server is issued by a CA server that the device trusts. If you fail to do so, the log server will fail the identity authentication. Similarly, if the log server needs to authenticate the identity of the device, the local certificate of the device must also be issued by a CA server that the log server trusts.

Prerequisites

1.     Configure the CA server.

This configuration example uses a Windows Server 2012 server as the CA server. (Details not shown.)

2.     Configure log server settings.

This configuration example uses Kiwi Syslog Server as the log server. Complete the following tasks:

¡     Apply for local certificates

Apply for a server certificate from a CA server (Windows Server 2012 server in this example) that the device trusts. Make sure the certificate type supports server identity authentication. After you apply for the certificate, import it to the personal certificate node of the local computer console that hosts Kiwi Syslog Server.

¡     Configure the log server.

Configure the server address, log processing actions (such as console display or file writing), log processing frequency, and input protocol on Kiwi Syslog Server. In this example, select Secure TCP as the input protocol, set the protocol version to TLS 1.2, and specify port ID 6514. Then, select the server certificate imported in the previous step.

Procedure

1.     Assign addresses to interfaces.

<Sysname> system-view

[Sysname] sysname Device

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] ip address 2.2.2.10 24

[Device-GigabitEthernet1/0/1] quit

[Device] interface gigabitethernet 1/0/2

[Device-GigabitEthernet1/0/2] ip address 192.168.56.20 24

[Device-GigabitEthernet1/0/2] quit

2.     Configure the device to apply for a certificate.

This example describes how to manually apply for a certificate online. For information about how to apply for a certificate offline, see PKI configuration in Security Configuration Guide.

# Configure PKI entity en and set its common name to ssl-client.

<Sysname> system-view

[Sysname] sysname Device

[Device] pki entity en

[Device-pki-entity-en] common-name ssl-client

[Device-pki-entity-en] quit

# Configure PKI domain dm1. Specify the trusted CA name as ca01, set the URL of the certificate request reception authority to http://192.168.56.10/certsrv/mscep/mscep.dll, specify the type of certificate request reception authority as RA, and set the entity name to en.

[Device] pki domain dm1

[Device-pki-domain-dm1] ca identifier ca01

[Device-pki-domain-dm1] certificate request url http://192.168.56.10/certsrv/mscep/mscep.dll

[Device-pki-domain-dm1] certificate request from ra

[Device-pki-domain-dm1] certificate request entity en

# Disable CRL checking.

[Device-pki-domain-dm1] undo crl check enable

# Specify 2048-bit general purpose RSA key pair abc for certificate request.

[Device-pki-domain-dm1] public-key rsa general name abc length 2048

[Device-pki-domain-dm1] quit

# Create a local RSA key pair.

[Device] public-key local create rsa name abc

The range of public key size is (512 ~ 2048).

If the key modulus is greater than 512,it will take a few minutes.

Press CTRL+C to abort.

Input the modulus length [default = 1024]:2048

Generating Keys...

..........................++++++

.....................................++++++

Create the key pair successfully.

# Obtain the CA certificate.

[Device] pki retrieve-certificate domain dm1 ca

The trusted CA's finger print is:

    MD5  fingerprint:7682 5865 ACC2 7B16 6F52 D60F D998 4484

    SHA1 fingerprint:DF6B C53A E645 5C81 D6FC 09B0 3459 DFD1 94F6 3DDE

Is the finger print correct?(Y/N):y

Retrieved the certificates successfully.

# Apply for a local certificate for the device.

 

 

NOTE:

If the log server does not need to authenticate client identity, the device does not need to request a local certificate. For the log server to authenticate client identity, make sure the certificate the CA server issues to the client supports client authentication.

 

[Device] pki request-certificate domain dm1

Start to request general certificate ...

Certificate requested successfully.

3.     Configure an SSL client policy.

# Create an SSL client policy named myssl.

[Device] ssl client-policy myssl

# Configure the SSL client policy to use PKI domain dm1.

[Device-ssl-client-policy-myssl] pki-domain dm1

# Specify the TLS version for the SSL client policy as TLS 1.2.

[Device-ssl-client-policy-myssl] version tls1.2

# Specify the cipher suites supported by the SSL client policy.

[Device-ssl-client-policy-myssl] prefer-cipher ecdhe_ecdsa_aes_128_cbc_sha

 ecdhe_ecdsa_aes_128_cbc_sha256 ecdhe_ecdsa_aes_128_gcm_sha256 ecdhe_ecdsa_aes_256_gcm_sha384 ecdhe_ecdsa_aes_256_cbc_sha ecdhe_ecdsa_aes_256_cbc_sha384 rsa_aes_256_gcm_sha384 rsa_aes_128_gcm_sha256 rsa_aes_256_cbc_sha

# Enable the SSL client to authenticate the SSL server.

[Device-ssl-client-policy-myssl] server-verify enable

[Device-ssl-client-policy-myssl] quit

4.     Configure the information center.

# Enable the information center.

[Device] info-center enable

# Specify the source IP address for logs sent to log hosts as the IP address of GigabitEthernet 1/0/1.

[Device]  info-center loghost source GigabitEthernet1/0/1

# Configure the device to output log messages to the log server at 2.2.2.2 by using a TLS TCP connection and port number 6514.

[Device] info-center loghost 2.2.2.2 tcp ssl-client-policy myssl port 6514

Verifying the configuration

You can use a packet capture tool to verify that the TLS connection is established when commands are executed on the device or log messages are generated. Meanwhile, the console also displays the configuration and log information.

 

 

Configuration files

#

 sysname Device

#

interface GigabitEthernet1/0/1

 port link-mode route

 ip address 2.2.2.10 255.255.255.0

#

interface GigabitEthernet1/0/2

 port link-mode route

 ip address 192.168.56.20 255.255.255.0

#

 info-center loghost source GigabitEthernet1/0/1

 info-center loghost 2.2.2.2 port 6514 tcp ssl-client-policy myssl

#

pki domain dm1

 ca identifier ca01

 certificate request url http://192.168.56.10/certsrv/mscep/mscep.dll

 certificate request from ra

 certificate request entity en

 public-key rsa general name abc length 2048

 undo crl check enable

#

pki entity en

 common-name ssl-client

#

ssl client-policy myssl

 pki-domain dm1

 version tls1.2

 prefer-cipher ecdhe_ecdsa_aes_128_cbc_sha ecdhe_ecdsa_aes_128_cbc_sha256 ecdhe_ecdsa_aes_128_gcm_sha256 ecdhe_ecdsa_aes_256_gcm_sha384 ecdhe_ecdsa_aes_256_cbc_sha ecdhe_ecdsa_aes_256_cbc_sha384 rsa_aes_256_gcm_sha384 rsa_aes_128_gcm_sha256 rsa_aes_256_cbc_sha

#

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us