cc/td/doc/product/software/ios121/121cgcr/secur_r
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Lock-and-Key Commands

Lock-and-Key Commands

This chapter describes lock-and-key commands. Lock-and-key security is a traffic filtering security feature that uses dynamic access lists. Lock-and-key is available for IP traffic only.

Refer to the Command Reference Master Index or search online to find complete descriptions of other commands used when configuring lock-and-key.

For lock-and-key configuration information, refer to the "Configuring Lock-and-Key Security (Dynamic Access Lists)" chapter in the Cisco IOS Security Configuration Guide.

access-enable

To enable the router to create a temporary access list entry in a dynamic access list, use the access-enable EXEC command.

access-enable [host] [timeout minutes]

Syntax Description

host

(Optional) Tells the software to enable access only for the host from which the Telnet session originated. If not specified, the software allows all hosts on the defined network to gain access. The dynamic access list contains the network mask to use for enabling the new network.

timeout minutes

(Optional) Specifies an idle timeout for the temporary access list entry. If the access list entry is not accessed within this period, it is automatically deleted and requires the user to authenticate again. The default is for the entries to remain permanently. We recommend that this value equal the idle timeout set for the WAN connection.

Command Modes

EXEC

Command History
Release Modification

11.1

This command was introduced.

Usage Guidelines

This command enables the lock-and-key access feature.

You should always define either an idle timeout (with the timeout keyword in this command) or an absolute timeout (with the timeout keyword in the access-list command). Otherwise, the temporary access list entry will remain, even after the user terminates the session.

Use the autocommand command with the access-enable command to cause the access-enable command to execute when a user Telnets into the router.

Examples

The following example causes the software to create a temporary access list entry and tells the software to enable access only for the host from which the Telnet session originated. If the access list entry is not accessed within 2 minutes, it is deleted.

autocommand access-enable host timeout 2

Related Commands
Command Description

access-list (IP extended)

Defines an extended IP access list.

autocommand

Configures the Cisco IOS software to automatically execute a command when a user connects to a particular line.

show ip accounting

Displays the active accounting or checkpointed database or displays access list violations.

access-template

To manually place a temporary access list entry on a router to which you are connected, use the access-template EXEC command.

access-template [access-list-number | name] [dynamic-name] [source] [destination] [timeout minutes]

Syntax Description

access-list-number

(Optional) Number of the dynamic access list.

name

(Optional) Name of an IP access list. The name cannot contain a space or quotation mark, and must begin with an alphabetic character to avoid ambiguity with numbered access lists.

dynamic-name

(Optional) Name of a dynamic access list.

source

(Optional) Source address in a dynamic access list. The keywords host and any are allowed. All other attributes are inherited from the original access-list entry.

destination

(Optional) Destination address in a dynamic access list. The keywords host and any are allowed. All other attributes are inherited from the original access-list entry.

timeout minutes

(Optional) Specifies a maximum time limit for each entry within this dynamic list. This is an absolute time, from creation, that an entry can reside in the list. The default is an infinite time limit and allows an entry to remain permanently.

Command Modes

EXEC

Command History
Release Modification

11.1

This command was introduced.

Usage Guidelines

This command provides a way to enable the lock-and-key access feature.

You should always define either an idle timeout (with the timeout keyword in this command) or an absolute timeout (with the timeout keyword in the access-list command). Otherwise, the dynamic access list will remain, even after the user has terminated the session.

Examples

The following example enables IP access on incoming packets in which the source address is 172.29.1.129 and the destination address is 192.168.52.12. All other source and destination pairs are discarded.

access-template 101 payroll host 172.29.1.129 host 192.168.52.12 timeout 2

Related Commands
Command Description

access-list (IP extended)

Defines an extended IP access list.

autocommand

Configures the Cisco IOS software to automatically execute a command when a user connects to a particular line.

clear access-template

Clears a temporary access list entry from a dynamic access list manually.

show ip accounting

Displays the active accounting or checkpointed database or displays access list violations.

clear access-template

To manually clear a temporary access list entry from a dynamic access list, use the clear access-template EXEC command.

clear access-template [access-list-number | name] [dynamic-name] [source] [destination]

Syntax Description

access-list-number

(Optional) Number of the dynamic access list from which the entry is to be deleted.

name

(Optional) Name of an IP access list from which the entry is to be deleted. The name cannot contain a space or quotation mark, and must begin with an alphabetic character to avoid ambiguity with numbered access lists.

dynamic-name

(Optional) Name of the dynamic access list from which the entry is to be deleted.

source

(Optional) Source address in a temporary access list entry to be deleted.

destination

(Optional) Destination address in a temporary access list entry to be deleted.

Command Modes

EXEC

Command History
Release Modification

11.1

This command was introduced.

Usage Guidelines

This command is related to the lock-and-key access feature. It clears any temporary access list entries that match the parameters you define.

Examples

The following example clears any temporary access list entries with a source of 172.20.1.12 from the dynamic access list named vendor:

clear access-template vendor 172.20.1.12

Related Commands
Command Description

access-list (IP extended)

Defines an extended IP access list.

access-template

Places a temporary access list entry on a router to which you are connected manually.

show ip accounting

Displays the active accounting or checkpointed database or displays access list violations.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Tue Apr 4 17:37:10 PDT 2000
Copyright 1989 - 2000©Cisco Systems Inc.