Guest

Cisco IOS Software Releases 12.1 E

Secure HTTP (HTTPS)

Table Of Contents

Secure HTTP (HTTPS)

Feature Overview

Connecting Securely to the Cisco IOS HTTPS Server

Benefits

Restrictions

Related Features and Technologies

Related Documents

Supported Platforms

Supported Standards, MIBs, and RFCs

Prerequisites

RSA Key Pair

Digital Certificate

Client System Requirements

Configuration Tasks

Enabling HTTPS

Disabling HTTPS

Changing the HTTPS Port Number

Configuring HTTPS Authentication

Verifying HTTPS Configuration

Troubleshooting Tips

Configuration Examples

Enabling HTTPS Example

Disabling HTTPS Example

Changing the HTTPS Port Number Example

Command Reference

debug ip http secure-all

debug ip http secure-session

debug ip http secure-state

ip http secure-port

ip http secure-server


Secure HTTP (HTTPS)


Feature History

Release
Modification

12.1(11b)E

This feature was introduced on 7100 series routers and 7200 series routers.

12.2(14)S

This feature was integrated into Cisco IOS Release 12.2(14)S.


This document describes the Secure HTTP (HTTPS) feature in Cisco IOS release 12.1(11b)E. It contains the following sections:

Feature Overview

Supported Platforms

Supported Standards, MIBs, and RFCs

Prerequisites

Configuration Tasks

Configuration Examples

Command Reference

Feature Overview

The Cisco IOS HTTP server provides authentication, but not encryption, for client connections. The data that the client and server transmit to each other is not encrypted. This leaves communication between clients and servers vulnerable to interception and attack.

The Secure HTTP (HTTPS) feature provides the capability to connect to the Cisco IOS HTTPS server securely. It uses Secure Sockets Layer (SSL) and Transport Layer Security (TLS) to provide device authentication and data encryption (see the "Benefits" section).

The HTTP and HTTPS servers can be enabled and disabled separately.

Connecting Securely to the Cisco IOS HTTPS Server

When the Secure HTTP (HTTPS) feature is enabled (see the "Enabling HTTPS" section for instructions), you can connect to the device securely by connecting to the following URL with a web browser that supports SSL:

https://device:[port_number]

where device is the IP address of the device (or its DNS name if the device is registered in DNS) and port_number is the HTTPS port number. You can omit port_number if HTTPS is configured to use the default port. The default HTTPS port is 443, but you can change it.


Note The protocol identifier https (note the "s" at the end) tells the server that the client is trying to connect securely. If you omit the "s" the connection will not be secure. If HTTPS is not configured to use the default port, you must specify the secure port or the connection will fail.


When you connect to the secure port, the following happens automatically:

The client authenticates the server using the server's digital certificate

The client and server negotiate which cipher suite (set of security protocols) they will use for the connection.

The client and server generate session keys for encrypting and decrypting data.

The client and server establish a secure encrypted connection.

If authentication fails or the client and server cannot negotiate a cipher suite, the session ends.

Benefits

The Secure HTTP (HTTPS) feature provides the following benefits:

Encrypted Communication with Cisco IOS HTTPS Server

HTTPS encrypts communications among connected clients and servers to provide data confidentiality. It supports the following encryption algorithms:

Ron's Cipher 2 (RC2) with 40-, 50-, 60-, and 128-bit encryption

Ron's Cipher 4 (RC4) with 40-, 50-, 60-, and 128-bit encryption

Authenticated Communication Between Client and Server

HTTPS authenticates the client and the server with each other before establishing a connection. It supports the following authentication algorithms and standards:

Digest-based:

Message Digest 5 (MD5)

Secure Hash Algorithm 1 (SHA-1)

Public key-based:

Rivest-Shamir-Adelman (RSA) encryption/decryption/generation

Digital Signature Algorithm (DSA) encryption/decryption/generation

Diffie-Hellman key-exchange/key generation

X.509 digital certificates

Restrictions

Client systems must meet the requirements described in the "Client System Requirements" section.

Related Features and Technologies

The Cisco web browser interface is documented in the Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.2.

Public key infrastructure (PKI) and its component features (such as digital certificates and certification authorities) are documented in the Cisco IOS Security Configuration Guide, Release 12.2.

Secure Sockets Layer (SSL)

Transport Layer Security (TLS)

Related Documents

Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.2

Cisco IOS Security Configuration Guide, Release 12.2

Internet-draft The SSL Protocol Version 3.0

Supported Platforms

The Secure HTTP (HTTPS) feature is supported in Cisco IOS images whose filenames contain the characters "k2" or "56i". The Secure HTTP (HTTPS) feature is supported on these platforms:

Cisco 7100 series routers

Cisco 7200 series routers

Cisco 7400 series routers

Platform Support Through Feature Navigator

Cisco IOS software is packaged in feature sets that support specific platforms. To get updated information regarding platform support for this feature, access Feature Navigator. Feature Navigator dynamically updates the list of supported platforms as new platform support is added for the feature.

Feature Navigator is a web-based tool that enables you to quickly determine which Cisco IOS software images support a specific set of features and which features are supported in a specific Cisco IOS image.

To access Feature Navigator, you must have an account on Cisco.com. If you have forgotten or lost your account information, e-mail the Contact Database Administration group at cdbadmin@cisco.com. If you want to establish an account on Cisco.com, go to http://www.cisco.com/register and follow the directions to establish an account.

Feature Navigator is updated when major Cisco IOS software releases and technology releases occur. As of May 2001, Feature Navigator supports M, T, E, S, and ST releases. You can access Feature Navigator at the following URL:

http://www.cisco.com/go/fn

Supported Standards, MIBs, and RFCs

Standards

No new or modified standards are supported by this feature.

MIBs

No new or modified MIBs are supported by this feature.

To obtain lists of supported MIBs by platform and Cisco IOS release, and to download MIB modules, go to the Cisco MIB website on Cisco.com at the following URL:

http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml

RFCs

No new or modified RFCs are supported by this feature.

Prerequisites

Complete the following prerequisites before using the Secure HTTP (HTTPS) feature.

RSA Key Pair

You should generate an RSA usage key pair with a length of 1024 bits or greater for the device (as described in the "IP Security and Encryption" chapter of Cisco IOS Security Configuration Guide, Release 12.2). The following is an example of a command that generates a suitable RSA key pair:

crypto key generate rsa usage 1024


Note Even if you do not obtain a digital certificate for the device from a certification authority (CA), the device needs a key pair to generate a self-signed digital certificate.


RSA key pairs generated by a version of IOS that does not include the Secure HTTP (HTTPS) feature will not work with HTTPS. If you upgrade the IOS version on your device from a version that does not include the Secure HTTP (HTTPS) feature to a version that does include it, and you intend to connect to the device using HTTPS, you must delete existing RSA keys and generate new RSA usage keys using the new IOS version (as described in the "IP Security and Encryption" chapter of Cisco IOS Security Configuration Guide, Release 12.2).

If you do not generate an RSA usage key pair manually, an RSA usage key pair with a length of 768 bits will be generated automatically when you connect to the HTTPS server for the first time. These automatically generated RSA keys are not saved to the startup configuration, therefore they will be lost when the device is rebooted unless you save the configuration manually.

Digital Certificate

You should obtain an X.509 digital certificate with digital signature capabilities for the device from a certification authority (CA) (as described in the "IP Security and Encryption" chapter of Cisco IOS Security Configuration Guide, Release 12.2).

Digital certificates obtained by a version of IOS that does not include the Secure HTTP (HTTPS) feature will not work with HTTPS. If you upgrade the IOS version on your device from a version that does not include the Secure HTTP (HTTPS) feature to a version that does include it, and you intend to connect to the device using HTTPS, you must delete the existing device digital certificate and obtain a new device digital certificate from a CA using the new IOS version (as described in the "IP Security and Encryption" chapter of Cisco IOS Security Configuration Guide, Release 12.2).

If you do not obtain a digital certificate in advance, the device creates a self-signed digital certificate to authenticate itself.

If you change the device hostname after obtaining ia device digital certificate, HTTPS connections to the device fail because the hostname does not match the hostname specified in the digital certificate. Obtain a new device digital certificate using the new hostname to fix this problem.

Client System Requirements

Client systems must have a web browser that supports SSL to connect to the Cisco IOS HTTPS server securely.

The following client operating system and browser combinations have been tested:

Browser
Operating System(s)

Netscape Navigator 4.76 or later

Windows 98, Windows NT (with service pack 6a), Windows 2000, Solaris 2.6

Internet Explorer 5.0 or later

Windows 98, Windows NT (with service pack 6a), Windows 2000


Configuration Tasks

See the following sections for configuration tasks for the Secure HTTP (HTTPS) feature. Each task is identified as required or optional.

Enabling HTTPS (required)

Disabling HTTPS (optional)

Changing the HTTPS Port Number (optional)

Verifying HTTPS Configuration (optional)

Configuring HTTPS Authentication (optional)

Enabling HTTPS

To enable HTTPS, enter the following command in global configuration mode:

Command
Purpose

Router(config)# ip http secure-server

Enables HTTPS.


Disabling HTTPS

To disable HTTPS, enter the following command in global configuration mode:

Command
Purpose

Router(config)# no ip http secure-server

Disables HTTPS.


Changing the HTTPS Port Number

The default HTTPS port number is 443. To change the HTTPS port number, enter the following command in global configuration mode:

Command
Purpose

Router(config)# ip http secure-port port_number

Changes the secure HTTPS port number. The acceptable range is 1-65535.


You cannot configure the HTTP and HTTPS servers to use the same port. If you try to do so, the following error message appears:

% Port port_number in use by HTTP.

where port_number is the port number that is already assigned to the HTTP server.

If you change the HTTPS port number, clients attempting to connect to the HTTPS server must specify the port number in the URL, in this format:

https://device:port_number

where port_number is the HTTPS port number.

Configuring HTTPS Authentication

The HTTPS server uses the same authentication configuration settings as the HTTP server. Configuring HTTP authentication using the ip http authentication command also configures authentication for HTTPS. Configuring authentication for the HTTP and HTTPS servers adds additional security to communication between clients and the HTTP and HTTPS servers on the device.

Refer to the "Cisco IOS User Interfaces" chapter of the Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.2, for information about configuring HTTP (and HTTPS) authentication.

Verifying HTTPS Configuration

Follow these steps to verify that HTTPS is configured correctly:


Step 1 Enter the show running-config command and verify the following:

a. The following line appears in the running configuration:

ip http secure-server

b. If you changed the HTTPS port number from the default, the following line appears in the running configuration:

ip http secure-port port_number

where port_number is the port number you configured as the HTTPS port.

Step 2 Connect to the device using a web browser that supports SSL to verify that it can connect securely:

a. Connect to the following URL using the web browser:

https://device:[port_number]

where device is the IP address of the device (or its DNS name if the device is registered in DNS) and port_number is the HTTPS port number. You can omit port_number if HTTPS is configured to use the default port. The default secure HTTPS port number is 443, but you can change it.


Note The protocol identifier https (note the "s" at the end) indicates to the server that the client is trying to connect securely. If you omit the "s" the connection will not be secure. If HTTPS is not configured to use the default port, you must specify the secure port number or the connection will fail.


b. If a dialog box appears informing you that you are connecting to a secure page, click OK (or the equivalent button).

c. Enter a valid username and password (if necessary) in the login dialog box, then click OK.

The device home page should appear in the web browser.

d. Verify that the connection is secure using the indicators provided by the web browser.

In Internet Explorer 5.x and Netscape Navigator 4.x, a padlock icon appears in the status bar.

In Internet Explorer 5.x, select File > Properties and verify in the Properties dialog box that the entry in the Protocol field is HyperText Transfer Protocol with Privacy.

In Netscape Navigator 4.x, click the Security button in the main toolbar and verify in the Security Info dialog box that the page was encrypted.


Troubleshooting Tips

If any of the following Syslog error messages appear (Syslog messages appear on the console only), verify that the device has an RSA key pair and a valid router digital certificate and that the device hostname was not changed after a digital certificate was obtained from a certification authority (CA):

01:28:02: %OPENSSL-3-SSLERR:  No router certificate for HOSTNAME
01:28:02: %OPENSSL-3-SSLERR:  Unable to load router certificate for HOSTNAME
01:28:02: %OPENSSL-3-SSLERR:  Unable to load self-signed certificate for HOSTNAME

where hostname is the device hostname.

Configuration Examples

This section provides the following configuration examples:

Enabling HTTPS Example

Disabling HTTPS Example

Changing the HTTPS Port Number Example

Enabling HTTPS Example

The following command enables HTTPS:

ip http secure-server

Disabling HTTPS Example

The following command disables HTTPS:

no ip http secure-server

Changing the HTTPS Port Number Example

The following command changes the secure HTTPS port number to 1000:

ip http secure-port 1000

You cannot configure the HTTP and HTTPS servers to use the same port. If you try to do so, the following error message appears:

% Port port_number in use by HTTP.

where port_number is the port number that is already assigned to the HTTP server.

If you change the HTTPS port number, clients attempting to connect to the HTTPS server must specify the port number in the URL, in this format:

https://device:port_number

where port_number is the HTTPS port number.

Command Reference

This section documents new commands. All other commands used with this feature are documented in the Cisco IOS Release 12.1(11b)E command reference publications.

debug ip http secure-all

Use the debug ip http secure-all command in privileged EXEC mode to generate the following:

The debugging information generated by the debug ip http secure-session command

The debugging information generated by the debug ip http secure-state command

Debugging information for each call to the SSL driver, for use primarily by Cisco support personnel

To disable this debugging, use the no form of this command.

debug ip http secure-all
no debug ip http secure-all

Syntax Description

This command has no arguments or keywords.


Defaults

No default behavior or values.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(11b)E

This command was introduced.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.


Usage Guidelines

This command generates the following:

The debugging information generated by the debug ip http secure-session command. See the section "debug ip http secure-session" section for example debugging output.

The debugging information generated by the debug ip http secure-state command. See the section "debug ip http secure-state" section for example debugging output.

Debugging information for each call to the SSL driver, for use primarily by Cisco support personnel

Examples

The following example generates the following:

The debugging information generated by the debug ip http secure-session command

The debugging information generated by the debug ip http secure-state command

Debugging information for each call to the SSL driver

debug ip http secure-all

Related Commands

Command
Description

debug ip http secure-session

Generates debugging information about each new secure HTTPS session when it is created.

debug ip http secure-state

Generates debugging information each time the secure HTTPS server changes state.


debug ip http secure-session

To generate debugging information about each new secure HTTPS session when it is created, use the debug ip http secure-session command in privileged EXEC mode. To disable this debugging, use the no form of this command.

debug ip http secure-session
no debug ip http secure-session

Syntax Description

This command has no arguments or keywords.


Defaults

No default behavior or values.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(11b)E

This command was introduced.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.


Usage Guidelines

This command generates debugging information about each new HTTPS session when it is created. When a new HTTPS session is created, debugging information is generated in the following format:

HTTPS SSL Session Established/Handshake done - Peer 10.0.0.1
state = SSL negotiation finished successfully
SessionInfo: Digest=RC4-MD5 SSLVer=SSLv3 KeyEx=RSA Auth=RSA Cipher=RC4(128) Mac=MD5

The SessionInfo fields provide the following information about the session:

Digest—digest mechanism

SSLVer—SSL or TSL version

KeyEx—key exchange mechanism

Auth—authentication mechanism

Cipher—encryption algorithm

Mac—Message Authentication Code algorithm

Examples

The following example generates debugging information about each new HTTPS session when it is created:

debug ip http secure-session

Related Commands

Command
Description

debug ip http secure-state

Generates debugging information each time the HTTPS server changes state.

debug ip http secure-all

Enables all other debugging ip http secure-x commands and generates debugging information for each call to the HTTPS server driver.


debug ip http secure-state

To generate debugging output each time the Secure HTTP (HTTPS) feature changes state, use the debug ip http secure-state command in privileged EXEC mode. To disable this debugging, use the no form of this command.

debug ip http secure-state
no debug ip http secure-state

Syntax Description

This command has no arguments or keywords.


Defaults

No default behavior or values.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(11b)E

This command was introduced.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.


Usage Guidelines

This command generates debugging information each time the Secure HTTP (HTTPS) feature changes state. When the Secure HTTP (HTTPS) feature changes state, debugging information is generated in the following format:

HTTPS SSL State  Change - Peer 10.0.0.1
Old State = SSLv3 read finished A, New State = SSL negotiation finished successfully

Examples

The following example generates debugging information each time the Secure HTTP (HTTPS) feature changes state:

debug ip http secure-state

Related Commands

Command
Description

debug ip http secure-state

Generates debugging information each time the HTTPS server changes state.

debug ip http secure-all

Enables all other debugging ip http secure-x commands and generates debugging information for each call to the HTTPS server driver.


ip http secure-port

To change the HTTPS port number, use the ip http secure-port command in global configuration mode.

ip http secure-port port_number

Syntax Description

port_number

Secure HTTPS port number. Acceptable range is 1-65535.


Defaults

There is no default value for port_number.

Command Modes

global configuration

Command History

Release
Modification

12.1(11b)E

This command was introduced.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.


Usage Guidelines

Enabling HTTPS using the ip http secure-server command enables port 443 as the default HTTPS port. Use the ip http secure-port command only if you want to change the secure port number from the default.

You cannot configure the HTTP and HTTPS servers to use the same port. If you try to do so, the following error message appears:

% Port port_number in use by HTTP.

where port_number is the port number that is already assigned to the HTTP server.

If you change the HTTPS port number, clients attempting to connect to the HTTPS server must specify the port number in the URL, in this format:

https://device:port_number

where port_number is the HTTPS port number.

Examples

The following example changes the HTTPS port number to 1000:

ip http secure-port 1000

Related Commands

Command
Description

ip http secure-server

Enables Secure HTTP (HTTPS).


ip http secure-server

To enable HTTPS, use the ip http secure-server command in global configuration mode. To disable HTTPS, use the no form of this command.

ip http secure-server
no ip http secure-server

Syntax Description

This command has no arguments or keywords.


Defaults

By default, HTTPS is disabled. The default HTTPS port number is 443.

Command Modes

global configuration

Command History

Release
Modification

12.1(11b)E

This command was introduced.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.


Examples

The following example enables HTTPS:

ip http secure-server

The following example disables HTTPS:

no ip http secure-server

Related Commands

Command
Description

ip http secure-port

Changes the secure HTTPS port number.